InsertJSONStructure()
语法
InsertJSONStructure(JSONValue, *Buffer, Structure)概要
Insert the contents of the specified structure memory into the given JSON value. The JSON value will be changed to type #PB_JSON_Object and contain one member for each member in the structure.
参数
JSONValue The JSON value. The previous content of the value will be changed to the contant of the structure. *Buffer The address of the structure to insert into the JSON value. Structure The type of the structure to insert.
返回值
无.
示例
Structure Person FirstName$ LastName$ Age.l List Books.s() EndStructure Define P.Person P\FirstName$ = "John" P\LastName$ = "Smith" P\Age = 42 AddElement(P\Books()): P\Books() = "Investing For Dummies" AddElement(P\Books()): P\Books() = "English Grammar For Dummies" AddElement(P\Books()): P\Books() = "A Little Bit of Everything For Dummies" If CreateJSON(0) InsertJSONStructure(JSONValue(0), @P, Person) Debug ComposeJSON(0, #PB_JSON_PrettyPrint) EndIf
参阅
InsertJSONArray(), InsertJSONList(), InsertJSONMap(), ExtractJSONArray(), ExtractJSONList(), ExtractJSONMap(), ExtractJSONStructure(),
已支持操作系统
所有