Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feature: search cbor for an element at a given (JSON pointer like) path #736

Copy link
Copy link

Description

@elv-gilles
Issue body actions

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

Additional context
n/a

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.