Posts

Showing posts with the label mapping

Parsing dynamic json in go

Parsing dynamic json in go I am trying to parse the following json structure, where the fields marked with "val1" and "val2" are constantly changing, so I cannot use a predefined struct. How could I parse this json in a way to be able to loop through every single "val"? Thank you! {"result":true,"info":{"funds":{"borrow":{"val1":"0","val2":"0"},"free":{"val1":"0","val2":"0"},"freezed":{"val1":"0","val2":"0"}}}} struct { Borrow, Free, Freezed map[string]interface{} } – ThunderCat Jun 30 at 20:09 struct { Borrow, Free, Freezed map[string]interface{} } Possible duplicate of stackoverfl...