Skip to content

Encoding map[string]interface #26

Answered by kungfusheep
shreenibk asked this question in Q&A
Discussion options

You must be logged in to vote

Hi

Jingo works by knowing the shape of the data it is encoding ahead of time.

interface{} removes its ability to know this so the only way to support it would be to use reflection, which removes the speed benefits of jingo.

If you want the performance benefits possible with this package it might be worth trying to structure your data in a way that is sympathetic to this constraint.

Thanks - and apologies for the length of time it took to respond.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kungfusheep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants