An open API service indexing awesome lists of open source software.

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

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.