https://github.com/canopas/json-to-struct-converter
https://github.com/canopas/json-to-struct-converter
go json json-parser
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/canopas/json-to-struct-converter
- Owner: canopas
- Created: 2020-11-27T10:25:42.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-27T10:44:49.000Z (over 5 years ago)
- Last Synced: 2024-10-18T14:28:36.166Z (over 1 year ago)
- Topics: go, json, json-parser
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## JSONToStructConverter
This repository gives you data of your choice from complex nested JSON in golang.
Call ****StructuredJSON(JSONData, fieldName)**** and see the result.
### Example
````
jsonData := "{\"data\" : {\"student\" : {\"name\" : \"abc\",\"std\" : \"8\",\"roll no\" : \"20\"}}}"
StructuredJSON(jsonData, "student")
Result : {"name":"abc","roll no":"20","std":"8"}
````
We can unmarshal result to required struct.