Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-pyson

Like JSON, but for Python.
Supports any eval() in key and value pairs.
(So don't go around using it in production)

Example

import time
import random

import pyson

content = """
{
	"time" : time.time(),
	random.randint(0, 1) : "a random number",
	"another_level" : {
		"test" : 5
	},
	"main level" : True
}
"""

print(pyson.loads(content, globals(), locals()))

Produces:

{
	'time': 1604261222.4304745,
	1: 'a random number',
	'another_level': {
		'test': 5
	},
	'main level': True
}

About

Like JSON, but for Python data types.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages