You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem?
In the use case I'm working on, data is stored in a single CBOR structure.
Users provide input data via a REST API (as JSON) which is stored at conventional location(s) in the global structure.
Server processes then need to retrieve (and potentially modify) these data and/or create new one, also added in the structure.
This results in semi-large to large data.
The data flow currently consists in:
decoding the global structure into a generic map[string]interface{}
retrieving the sub-tree in the generic structure that corresponds to the specifics of the process via a JSON-pointer-like parameter
decode the sub-tree into the actually needed go structs via mapstructure (or other means, including re-encoding into json followed by json unmarshaling)
Describe the solution you'd like
It would be more efficient to be able to locate the sub-tree in cbor and decode into structs from there
Solution would be a function Search(keys []string) (offset int, err error) allowing to decode the element at the returned offset.
Describe alternatives you've considered
see description
Is your feature request related to a problem?
In the use case I'm working on, data is stored in a single CBOR structure.
Users provide input data via a REST API (as JSON) which is stored at conventional location(s) in the global structure.
Server processes then need to retrieve (and potentially modify) these data and/or create new one, also added in the structure.
This results in semi-large to large data.
The data flow currently consists in:
map[string]interface{}mapstructure(or other means, including re-encoding into json followed by json unmarshaling)Describe the solution you'd like
It would be more efficient to be able to locate the sub-tree in cbor and decode into structs from there
Solution would be a function
Search(keys []string) (offset int, err error)allowing to decode the element at the returned offset.Describe alternatives you've considered
see description
Additional context
n/a