---
title: 'encoding/json'
---
json provides functions for working with json data
## Index
* [def dumps(obj) string](#def-ijsonibdumpsb)
* [def loads(source) object](#def-ijsonibloadsb)
## Functions
#### def json.dumps
```go
json.dumps(obj) string
```
serialize obj to a JSON string
###### Arguments
| name | type | description |
|------|------|-------------|
| `obj` | `object` | input object |
#### def json.loads
```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 |