Category: JSON
Syntax:
jsonBeginObjectField:String(json:String, key:String)
String
Begins an object as the value of a named field.
Takes json string and key string.
Returns modified json via ReturnString.
View detailed documentation online
Local city:String = "New York"
Local json:String = jsonBegin()
json = jsonWriteString(json, "name", "John")
json = jsonBeginObjectField(json, "address")
json = jsonWriteString(json, "city", city)
json = jsonWriteString(json, "country", "USA")
json = jsonEndObject(json)
json = jsonEnd(json)
Print json ; {"name":"John","address":{"city":"New York","country":"USA"}}
BambooBasic © 2026 Michael Denathorn