BNSD
(Ben)
August 7, 2018, 10:19pm
1
Hello everyone,
I’m trying to convert sync.Map to JSON with json.Marshal but i get empty json “{}”.
Example:
https://play.golang.org/p/HNzOuuMQt21
I’m looking for a solution to convert sync.Map to json except convert it to Map (go over sync.Map and copy keys and values to Map) and convert the Map to JSON.
Thanks
heatbr
(Onezino Moreira)
August 9, 2018, 5:44pm
2
Problably u’ll need to convert before encode. https://play.golang.org/p/PdSjIcV8iJh
BNSD
(Ben)
August 9, 2018, 9:51pm
3
Thats exacly what I’m trying to avoid, i guess there is no other solution…
Thank you!
system
(system)
Closed
November 7, 2018, 9:51pm
4
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.