Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rjsonc

Remove JSON comments, FAST. No, really. I'm not paying bills for the slow Regex snail.

Supports Python typing.

$ pip install rjsonc

Usage

Quite literally. I mean, all it does is removing comments. What else do you expect?

import rjsonc

JSON = """{
    "name": "John Dough",  // now that's action packed
    "age": 69,
    /*

    DEPRECATED, I PROMISE!
    
    "criminal_records": ["stealing"]

    */
    "is_cool": true // that's what i'm talkin' about!
}"""

rjsonc.loads(JSON)
# {'name': 'John Dough', 'age': 69, 'is_cool': True}

def loads

def loads(s: str | bytes) -> Any

Loads JSON, tolerating comments.

About

Load JSON with comments. Fast.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages