Конвертация
Функции
Json( obj o ) str
JsonToObj( str s ) obj
run str {
return Json(JsonToObj(`{
"int": 1234,
"str": "value",
"float": -45.67,
"list":[{"on": true},
"sub 2",
"sub 3",
{
"q": "OK"
}]
}`))
}
// Result {"float":-45.67,"int":1234,"list":[{"on":true},"sub 2","sub 3",{"q":"OK"}],"str":"value"}StructDecode( buf b, struct s )
StructEncode( struct s ) buf
Last updated
Was this helpful?