{"action":"closed","issue":{"url":"https://api.github.com/repos/Convey-Compliance/superobject/issues/41","labels_url":"https://api.github.com/repos/Convey-Compliance/superobject/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/Convey-Compliance/superobject/issues/41/comments","events_url":"https://api.github.com/repos/Convey-Compliance/superobject/issues/41/events","html_url":"https://github.com/Convey-Compliance/superobject/issues/41","id":90186782,"number":41,"title":"Clone for stNull gives AV","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Convey-Compliance/superobject/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/Convey-Compliance/superobject/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/Convey-Compliance/superobject/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-22T19:22:10Z","updated_at":"2015-06-26T23:42:57Z","closed_at":"2015-06-26T23:42:57Z","body":"```\nWhat steps will reproduce the problem?\n\nvar\n  j1, j2, j3: ISuperObject;\nbegin\n  j1 := SO('{a:null}');\n  j2 := j1.Clone;\n  j3 := j2.Clone;\nend;\n\nWhat is the expected output? What do you see instead?\nNo AV.\n\nWhat version of the product are you using? On what operating system?\nLatest from svn (r54)\n\nPlease provide any additional information below.\nFunction TSuperObject.Clone for stNull returns nil. However parsing JSON object \ncreates stNull object (not nil).\n\nIt should create be:\nfunction TSuperObject.Clone: ISuperObject;\nvar\n  ite: TSuperObjectIter;\n  arr: TSuperArray;\n  j: integer;\nbegin\n  case FDataType of\n    stNull: Result := TSuperObject.Create(stNull); <- add this\n    stBoolean: ...\n\nYou could also add a check in Clone function, however I think that it should be \nconsistent with Load/Parse. But I see that similar check was added in Merge \nfunction (r37). So I'm not sure which one is more correct. Maybe both, so add \ncheck in Clone for nil and clone stNull as TSuperObject.Create(stNull)?\n```\n\nOriginal issue reported on code.google.com by `krystian...@gmail.com` on 22 Mar 2013 at 1:32"}}