Lets say I have:
type IObject interface {
}
type Item struct {
Description string
Data []byte
}
type FunctionX1 struct {
Object IInclusionObject
}
type FunctionX2 struct {
Object1 IInclusionObject
Object2 IInclusionObject
}
ItemFunctionX1FunctionX2IObject
FunctionX1{Item{"foo", []byte("bar")}}
"object": {
"Description": "foo"
"Data": ...
}
but rather:
"FunctionX1": {
"item": {
"Description": "foo"
"Data": ...
}
}
Do I need to do my own JSON marshaller - it does not seem that I can use the existing one.
Related questions in case I need my own. Is there JSON prettifier where I can stream valid but randomly formatted JSON and it to output pretty version (note the JSON could be significantly large - I do not want to generate, parse generate formatted).