CJON Property Reference - adsicks/gambas-json GitHub Wiki
Please document all Properties and proposed properties for the CJSON class on this page. Priority levels are 1 being important and 5 being low.
Read Only Properties
Arrays
Property Read {Arrays} As Integer
Returns the number of Arrays in the JSON
Members
Property Read Members As Integer
Returns total number of object members (i.e., "key" : "value") for the entire JSON.
NamedType
Property Read NamedType As String
Returns a string that describes the Type property. These are human readable strings that refer to the enumerated Type value. The valid values are:
- Boolean
- Number
- String
- Array
- Object
Objects
Property Read Objects As Integer
Returns the number of objects in the JSON.
Type
Property Read {Type} As Integer
Returns an Integer that represents an enum that describes the data type for the root of the document. The enumerated types correspond to the element values described in ECMA-404 and at json.org. Can be used by the calling application to help with further processing. The valid return values are:
{object} = &H05
{array} = &H04
{string} = &H03
{number} = &H02
{boolean} = &H01
{null} = &H00
Value
Property Read Value As Variant
Returns the default value or root document. Will return null, a boolean, a number, a string, a JSON object, or an array.
Read/Write Properties
Debug
Property {Debug} As Integer
Non functional. Priority 4
Sets debugging level with 0 being production. Debugging levels to be described in the enum.
LineNoWidth
Property LineNoWidth As Integer
Sets the width of the hexadecimal representation of the line number. (e.g., 6 -- 000FA1 / 4 -- 0FA1).
URL
Property {URL} As String
URL of the JSON to open or write. Can be a local file or a URL.