Difference between revisions of "ObjectType:jsonvaluecontainer"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
− | {{ObjectType-Vitals|jsonvaluecontainer|[[LavishScript]]|[[ObjectType:jsonvalue|jsonvalue]]|same as AsString|[[ObjectType:jsonvaluecontainer|jsonvaluecontainer]]|no|void *}} | + | {{ObjectType-Vitals|jsonvaluecontainer|[[LavishScript]]|[[ObjectType:jsonvalue|jsonvalue]] / [[ObjectType:jsonobject|jsonobject]] / [[ObjectType:jsonarray|jsonarray]]|same as AsString|[[ObjectType:jsonvaluecontainer|jsonvaluecontainer]]|no|void *}} |
+ | |||
+ | A '''jsonvaluecontainer''' is a mutable container for a json value (or object or array) | ||
− | |||
== Members == | == Members == | ||
+ | '''Note: A jsonvaluecontainer inherits the Members and Methods of the value it contains''' | ||
* [[ObjectType:string|string]] '''AsString''': The contained value as a string | * [[ObjectType:string|string]] '''AsString''': The contained value as a string | ||
* [[ObjectType:string|string]] '''AsJSON''': The contained value as single-line JSON text | * [[ObjectType:string|string]] '''AsJSON''': The contained value as single-line JSON text | ||
* [[ObjectType:string|string]] '''AsJSON[multiline]''': The contained value as multiline JSON text | * [[ObjectType:string|string]] '''AsJSON[multiline]''': The contained value as multiline JSON text | ||
− | * | + | * ... '''Value''': The contained value |
* [[ObjectType:string|string]] '''Type''': The type of JSON object stored; one of: null, object, string, number, array, true, false, integer. Note that while the JSON standard does not differentiate between floating-point numbers and integers, LavishScript does | * [[ObjectType:string|string]] '''Type''': The type of JSON object stored; one of: null, object, string, number, array, true, false, integer. Note that while the JSON standard does not differentiate between floating-point numbers and integers, LavishScript does | ||
== Methods == | == Methods == | ||
+ | '''Note: A jsonvaluecontainer inherits the Members and Methods of the value it contains''' | ||
* '''SetValue['''json''']''': Sets the contained json value, e.g. myJsonValueContainer:SetValue["{\"someValue\":17}"] will set myJsonValueContainer's value to a jsonobject that in turn contains one value | * '''SetValue['''json''']''': Sets the contained json value, e.g. myJsonValueContainer:SetValue["{\"someValue\":17}"] will set myJsonValueContainer's value to a jsonobject that in turn contains one value | ||
* '''ParseFile['''filename''']''': Sets the contained json value to the contents of a specified json file | * '''ParseFile['''filename''']''': Sets the contained json value to the contents of a specified json file |
Latest revision as of 19:58, 30 October 2018
Contents
Overview
jsonvaluecontainer | |
Defined By | LavishScript |
Inherits | jsonvalue / jsonobject / jsonarray |
Reduces To | same as AsString |
Variable Object Type | jsonvaluecontainer |
Uses Sub-Types | no |
C/C++ Type | void * |
A jsonvaluecontainer is a mutable container for a json value (or object or array)
Members
Note: A jsonvaluecontainer inherits the Members and Methods of the value it contains
- string AsString: The contained value as a string
- string AsJSON: The contained value as single-line JSON text
- string AsJSON[multiline]: The contained value as multiline JSON text
- ... Value: The contained value
- string Type: The type of JSON object stored; one of: null, object, string, number, array, true, false, integer. Note that while the JSON standard does not differentiate between floating-point numbers and integers, LavishScript does
Methods
Note: A jsonvaluecontainer inherits the Members and Methods of the value it contains
- SetValue[json]: Sets the contained json value, e.g. myJsonValueContainer:SetValue["{\"someValue\":17}"] will set myJsonValueContainer's value to a jsonobject that in turn contains one value
- ParseFile[filename]: Sets the contained json value to the contents of a specified json file
See Also
LavishScript Object Types
- Text
- string - mutablestring - unistring
- Numbers
- byte - float - float64 - int - uint - int64
- Boolean (TRUE/FALSE)
- bool
- Pointers
- boolptr - byteptr - floatptr - float64ptr - intptr - uintptr - int64ptr - rgbptr - stringptr
- Containers
- objectcontainer - array - index - collection - queue - stack - set - variablescope
- JSON
- jsonobject - jsonarray - jsonvaluecontainer - jsonvalue
- Iteration
- iterator - jsoniterator
- Date/Time
- time
- File Handling
- filepath - file - filelist - filelistentry
- Tasks
- lavishmachine - Accessed via the Top-Level Object LMAC
- task - tasklibrary - taskmanager - tasktype - taskpulseargs - elmactaskstate