Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
JSON Enhanced implements fast and pythonic queries and mutations for JSON objects.
You can install json-enhanced with pip:
pip install json-enhanced
import jsonutils as js
from datetime import datetime
# We create a new JSONObject either directly or from a local file/URL:
json_data = js.JSONObject(
{
"data": [
{
"name": "Dan",
"birthday": "1991-01-02 09:00:00",
"publications": 15
},
{
"name": "Mar",
"birthday": "1991-03-02 12:30:00",
"publications": 13
},
{
"name": "Carl",
"birthday": "1950-06-02 16:00:00",
"publications": 36
},
{
"name": "Vic",
"birthday": "1986-07-02 16:00:00",
"publications": None
},
]
}
)
# Now we can navegate through this object by attribute accesion:
json_data.data._1.name
# 'Mar'
# Or we can make queries. The syntax is very similar to Django's querysets:
result = json_data.query(birthday__lt=datetime(1985,1,1))
result
# <QuerySet ['1950-06-02 16:00:00']>
result.first().parent
# {'name': 'Carl', 'birthday': '1950-06-02 16:00:00', 'publications': 36}
# We can also retrieve the path of a node:
result.first().jsonpath
# data/2/
Detailed documentation is available at json-enhanced.readthedocs.io.
Contributions are welcome! Please take a look at our contributors guide.
Please read CODE_OF_CONDUCT.md for details on our code of conduct.
This project is licensed under the GPL-3.0 License. For details, please read our LICENSE FILE.
FAQs
Translates Django ORM query system to json objects
We found that json-enhanced demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.