V
V
VictorOlegovich2019-01-05 15:09:08
go
VictorOlegovich, 2019-01-05 15:09:08

How to edit json using golang?

Hello.
Please suggest how I could edit the Json file with the following structure:

{
  "data": {},
  "file_system": {},
  "security": {},
  "specifications": {},
  "storage": {
    "0": "cache"
  },
  "SYSTEM": {
    "0": "hvom"
  },
  "web": {
    "0": "websocket",
    "1": "router"
  }
}

to read this file, I get the following data type map[string]map[int]string
Task: when adding, removing and renaming modules, I want to change the json file in the appropriate place

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Melnikov, 2019-01-05
@VictorOlegovich

https://golang.org/pkg/encoding/json/Marshal/Unmarshal
_

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question