8000 GitHub - AWeirdDev/rjsonc: Load JSON with comments. Fast.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

AWeirdDev/rjsonc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

0