Skip to content

thedevop1/jsoncr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSONCR

PkgGoDev

JSONCR is a Go package that provides method to remove comments and indentations in JSON. Both block and line comments are supported. Common use is to process the JSON config file.

Getting Started

Installing

$ go get github.com/thedevop1/jsoncr

Example

    const j = `/* Comment */
{
    "example": "value" // more comment
}`
	condense, err := jsoncr.Remove(strings.NewReader(j))
	if err != nil {
        // error handling
    }
    var z interface{}
	err = json.Unmarshal(condense, &z)
	if err != nil {
        // error handling
	}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages