Skip to main content

WSON (Web Simple Object Notation)

Project description

WSON (Web Simple Object Notation)

Discord GitHub YouTube

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 PyPI PyPI
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 문자열
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"
        }
    ]
}
"""

# WSON 문자열을 Python 딕셔너리로 파싱
parsed_data = wson.loads(wson_data)
print("Parsed Data:")
print(parsed_data)

# Python 딕셔너리를 WSON 문자열로 직렬화
wson_output = wson.dumps(parsed_data)
print("\nSerialized WSON:")
print(wson_output)

Why WSON?

WSON addresses some limitations of JSON and YAML:

  1. Unlike JSON, WSON supports comments, making it more readable and self-documenting.
  2. WSON has a simpler syntax compared to YAML, reducing the chance of indentation errors.
  3. WSON preserves the original formatting when possible, unlike JSON which often alters the structure.
  4. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wson-0.2.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wson-0.2.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file wson-0.2.1.tar.gz.

File metadata

  • Download URL: wson-0.2.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Windows/10

File hashes

Hashes for wson-0.2.1.tar.gz
Algorithm Hash digest
SHA256 331fa1b675bd143425065c5d5a92b0cc684469c4bf37e5410dbde56c4edb84af
MD5 498385a9ecbaa8e05a09c7e2c4c02063
BLAKE2b-256 b960427306fbecd5cec838cf8b2324f12cc2ae2c517a4e510030bab3cf817e35

See more details on using hashes here.

File details

Details for the file wson-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: wson-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Windows/10

File hashes

Hashes for wson-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 deac8338b8d6cfe2c5577062bc827c7c5859e7c949b1e8ea3e3c9027a4960130
MD5 c6665883e292c621abe006f57027e3a3
BLAKE2b-256 3d68f48399f7f67ab97abe6b2fd2dab4e558e8159f404cba4bc8748278a1fb15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page