Closed dtseiler closed 1 year ago
Hey @dtseiler .
Do you know the shape of the JSON you're trying to parse ahead of time? For example with your example do you know that you expect something like
type MyJson struct {
Postgres Postgres `json:"postgres"`
// ...
}
type Postgres struct {
Version string `json:"version"`
Replication // ...
}
or you'd like to be able to parse any arbitrary nested JSON and keep it ordered all the way down?
Closing due to inactivity.
Good afternoon,
Trying to use orderedmap to read in json, set and/or delete a handful of values, then write the whole thing out again. We'd like to preserve the order if possible so I stumbled upon your library. If I have a json file like this:
So we can read it into an OrderedMap, add, update or delete a few of the values and then write everything out to the file. I'm not the greatest go wizard in the land so I'm struggling to think of how to do this with your lib. I'm not able to get to any of the nested values. Is this possible? For example if I want to set
postgres.archive_mode
tooff
orpostgres.replication.slots.foo
tofalse
.