This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Indicates whether the previously parsed JSON parse operation was valid.
Syntax
n = <CCJson>.Valid
Returns
Non-zero value for valid JSON.
Remarks
Restrictions
See also
Examples
uses "cjson", "console"
dim json as new CCJson ' Create an empty CCJson object
json.Parse("{'name': 'Eros'}") ' Parse invalid JSON string
printl "Is valid?: " + json.Valid ' Valid will return 0, because the JSON is invalid (because of usage of ' instead of ")
json.Parse("{""name"": ""Eros""}") ' Parse JSON string to be further processed by json object
printl "Is valid?: " + json.Valid ' Valid will return non-zero value, because the JSON is correct
waitkey