TJSONData
Base (abstract) object for all JSON based data types.
Declaration
Source position: fpjson.pp line 126
Description
TJSONData is an abstract class which introduces all properties and methods needed to work with JSON-based data. It should never be instantiated. Based on the type of data that must be represented one of the following descendents must be instantiated instead.
- Numbers
- must be represented using one of TJSONIntegerNumber, TJSONFloatNumber or TJSONInt64Number, depending on the type of the number.
- Strings
- can be represented with TJSONString.
- Boolean
- can be represented with TJSONBoolean.
- null
- is supported using TJSONNull
- Array
- data can be represented using TJSONArray
- Object
- data can be supported using TJSONObject
Properties
| Member |
Visibility |
Description |
| AsBoolean |
public |
Access the raw JSON value as a boolean. |
| AsFloat |
public |
Access the raw JSON value as a float. |
| AsInt64 |
public |
Access the raw JSON value as an 64-bit integer. |
| AsInteger |
public |
Access the raw JSON value as an 32-bit integer. |
| AsJSON read only |
public |
Return a JSON representation of the value. |
| AsLargeInt |
public |
Access to data as largeint. |
| AsQWord |
public |
Access the raw JSON value as an 64-bit unsigned integer. |
| AsString |
public |
Access the raw JSON value as a string. |
| AsUnicodeString |
public |
Return the value as a Unicode string. |
| CompressedJSON |
public |
Compress JSON - skip whitespace. |
| Count read only |
public |
Number of sub-items for this data element. |
| IsNull read only |
public |
Is the data a null value ? |
| Items |
public |
Indexed access to sub-items. |
| Value |
public |
The value of this data object as a variant. |
See all PropertiesMethods
| Member |
Visibility |
Description |
| Clear |
public |
Clear the raw value of this data object. |
| Clone |
public |
Duplicate the value of the JSON data. |
| Create |
public |
Create a new instance of TJSONData. |
| DumpJSON |
public |
Fast, memory efficient dump of JSON in stream. |
| FindPath |
public |
Find data by name. |
| FormatJSON |
public |
Return a formatted JSON representation of the data. |
| GetEnumerator |
public |
Return an enumerator for the data. |
| GetPath |
public |
Get data by name. |
| JSONType |
public |
The native JSON data type represented by this object. |
See all Methods