1
1
mirror of https://github.com/mcuadros/ascode synced 2024-11-29 21:11:22 +01:00
ascode/_documentation/runtime/json.md

45 lines
688 B
Markdown
Raw Normal View History

---
title: 'encoding/json'
---
json provides functions for working with json data
## Index
* [def <b>dumps</b>(obj) string](#def-ijsonibdumpsb)
* [def <b>loads</b>(source) object](#def-ijsonibloadsb)
## Functions
2019-07-11 18:45:42 +02:00
#### def <i>json</i>.<b>dumps</b>
```go
json.dumps(obj) string
```
serialize obj to a JSON string
###### Arguments
| name | type | description |
|------|------|-------------|
| `obj` | `object` | input object |
2019-07-11 18:45:42 +02:00
#### def <i>json</i>.<b>loads</b>
```go
json.loads(source) object
```
read a source JSON string to a starlark object
###### Arguments
| name | type | description |
|------|------|-------------|
| `source` | `string` | input string of json data |