JsonObject
class ref JsonObject
Constructors
create
Create a map with space for prealloc elements without triggering a resize. Defaults to 6.
new ref create( prealloc: USize val = 6) : JsonObject ref^
Parameters
- prealloc: USize val = 6
Returns
- JsonObject ref^
from_map
Create a Json object from a map.
new ref from_map( data': HashMap[String val, (F64 val | I64 val | Bool val | None val | String val | JsonArray ref | JsonObject ref), HashEq[String val] val] ref) : JsonObject ref^
Parameters
- data': HashMap[String val, (F64 val | I64 val | Bool val | None val | String val | JsonArray ref | JsonObject ref), HashEq[String val] val] ref
Returns
- JsonObject ref^
Public fields
var data: HashMap[String val, (F64 val | I64 val | Bool val | None val | String val | JsonArray ref | JsonObject ref), HashEq[String val] val] ref
The actual JSON object structure, mapping String
keys to other JSON structures.
Public Functions
string
Generate string representation of this object.
fun box string( indent: String val = "", pretty_print: Bool val = false) : String val
Parameters
Returns
- String val
© 2016-2020, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/json-JsonObject