Skip to content

Files

Latest commit

 

History

History

jvalue

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Introduction

JValue (JSON Value) provides support for schema, template and operator to interact with arbitrary JSON.

Usage

    // Parse JSON bytes to JValue.
    v, err := jvalue.ParseJSON([]byte("..."))
    if err != nil {
        return err
    }
    
    // We can get go-value from JValue easily.
    strArr, err := v.GetStringArr()
    if err != nil {
        return err
    }
    
    fmt.Println(strArr)
    
    // Marshal to JSON bytes.
    raw, err := v.Marshal()
    if err != nil {
        return err
    }
    
    fmt.Println(string(raw))