WSON (Web Simple Object Notation)
WSON is a simple, readable data interchange format that combines the best features of JSON and YAML while addressing some of their limitations.
Features
| Feature | Status | Description |
|---|---|---|
| Syntax | Implemented | The basic syntax of WSON is implemented. |
| Comment Support (// and # styles) | Implemented | The ability to remove comments is implemented. |
| Original Formatting Preservation | Not Implemented | The functionality to preserve original formatting is not explicitly implemented. |
| Nested Objects and Arrays Support | Implemented | Capable of parsing and serializing nested objects and arrays. |
| String, Number, Boolean, and Null Handling | Implemented | Can handle various data types. |
| Date and Time Handling | Implemented | Supports parsing and serializing date and time values. |
| Version Handling | Implemented | Supports parsing and serializing version numbers as tuples. |
Language Support
| Language | Status | Badges |
|---|---|---|
| Python | Implemented | |
| JavaScript | Not Implemented | |
| Java | Not Implemented | |
| C# | Not Implemented | |
| Ruby | Not Implemented | |
| Go | Not Implemented | |
| C | Not Implemented | |
| C++ | Not Implemented | |
| PHP | Not Implemented |
Installation
You can install WSON using pip:
pip install wson
Usage
Here's a quick example of how to use WSON in your Python projects:
import wson
# WSON String
wson_data = """
{
status = "success",
code = 200,
message = "Data retrieved successfully",
user = {
id = 123,
name = "John Doe",
email = "john@example.com",
age = 25
},
tasks = [
{
task_id = 1,
title = "Complete project report",
status = "in-progress",
due_date = "2024-10-15"
},
{
task_id = 2,
title = "Review team feedback",
status = "pending",
due_date = "2024-10-20"
}
]
}
"""
# Parsing the WSON string into the Python dictionary
parsed_data = wson.loads(wson_data)
print("Parsed Data:")
print(parsed_data)
# Serialize Python dictionaries into WSON strings
wson_output = wson.dumps(parsed_data)
print("\nSerialized WSON:")
print(wson_output)
Why WSON?
WSON addresses some limitations of JSON and YAML:
- Unlike JSON, WSON supports comments, making it more readable and self-documenting.
- WSON has a simpler syntax compared to YAML, reducing the chance of indentation errors.
- WSON preserves the original formatting when possible, unlike JSON which often alters the structure.
- WSON is more concise than JSON, omitting unnecessary quotation marks for keys.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License.
Links
Metadata
Release files for wson 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wson-0.2.4.tar.gz | 5.5 kB | Without provenance | Details for wson-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wson-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for wson-0.2.4-py3-none-any.whl |
Total release size: 11.4 kB
Release files / wson-0.2.4.tar.gz
| Download URL | wson-0.2.4.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de8f9e38a39b03d06b555dc9ec4ccc64f428cf7cc2a4f4988debeb84b6683df8
|
|
BLAKE2b-256 checksum How to use checksums |
c1c1dcd666724bb27f8daf6b4f16f6829a0e664585613c76b66a80da62228874
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Windows/11
|
Release files / wson-0.2.4-py3-none-any.whl
| Download URL | wson-0.2.4-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab0252bc27a35766e7ff7e349cfff7b14e8f5145ba09acc66f79421c98fc0b91
|
|
BLAKE2b-256 checksum How to use checksums |
99a06239e12086c04434dfa26ebb3d94fadce5a2d338fba430d2cec3d3ca8a3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Windows/11
|
Security for wson 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.