json

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 5 Imported by: 0

README

json

json provides functions for working with json data

Functions

dumps(obj) string

serialize obj to a JSON string

parameters:

name type description
obj object input object
loads(source) object

read a source JSON string to a starlark object

parameters:

name type description
source string input string of json data

Documentation

Overview

Package json implements a json parser for the starlark programming dialect

outline: json
  json provides functions for working with json data
  path: encoding/json
  functions:
    dumps(obj) string
      serialize obj to a JSON string
      params:
        obj object
          input object
    loads(source) object
      read a source JSON string to a starlark object
      params:
        source string
          input string of json data

Index

Constants

View Source
const ModuleName = "encoding/json.star"

ModuleName defines the expected name for this Module when used in starlark's load() function, eg: load('encoding/json.star', 'json')

Variables

This section is empty.

Functions

func Dumps

func Dumps(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)

Dumps serializes a starlark object to a json string

func LoadModule

func LoadModule() (starlark.StringDict, error)

LoadModule loads the base64 module. It is concurrency-safe and idempotent.

func Loads

func Loads(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)

Loads gets all values from a json source

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL