Has one parameter, Options
Description
Used to stream the WorkQuery into a JSON string
Options
The following Options are available, and may be space separated for valid combinations. The default used if blank is just the single value of "Array".
Note: Use the HttpType command with HttpType "application/json"
for API calls, or to view in browser with JSON formatting.
Example
LoadTable "MemTab.Person"
LTrimFields "MemTab.Person."
[New] Buff
Buff | JsonStream$ "Object"
SetNew "Embeded", `Buff
Buff | JsonStream$ "Object Array Format Embed"
SaveFile "Test1.json", Buff
SaveJsonFile "Test2.json", "Object Format Embed"
HtmlAlert "&success", "All ok! All Done."
Example Output
[
{
"Alias": 10101,
"Firstname": "DB Admin",
"Lastname": null,
"Birthdate": null,
"Gender": "Male",
"Email": "[email protected]",
"Embeded": {"10101":{"Firstname":"DB Admin","Lastname":null,"Birthdate":null,"Gender":"Male","Email":"[email protected]"},"10102":{"Firstname":"TrainerBob","Lastname":"Moxie","Birthdate":null,"Gender":"Male","Email":"[email protected]"}}
},
{
"Alias": 10102,
"Firstname": "TrainerBob",
"Lastname": "Moxie",
"Birthdate": null,
"Gender": "Male",
"Email": "[email protected]",
"Embeded": {"10101":{"Firstname":"DB Admin","Lastname":null,"Birthdate":null,"Gender":"Male","Email":"[email protected]"},"10102":{"Firstname":"TrainerBob","Lastname":"Moxie","Birthdate":null,"Gender":"Male","Email":"[email protected]"}}
}
]