semvec/pypi-packages huggingface dataset:
c64os-util 0.0.1
A collection of utilities for dealing with C64 OS files.
License: MIT
Requires Python: >=3.10,<4.0
Keywords: commodore,c64,C64 OS

# C64 OS Utilities

The `c64os_util` Python package provides a collection of classes, methods, and
scripts that allow you to parse, generate, or manipulate certain types of files
that are used in C64 OS. This package is useful to developers who are
cross-assembling C64 OS applications and wish to package up their resources as
part of the build pipeline.

For installation and usage instructions, or for an overview of features, please
refer to the [documentation](https://c64os-util.readthedocs.io/).
jsonjavascriptnotation 0.1.6
Access JSON using Javascript Object Notation.
License: MIT

# JSON Javascript Notation
Allows Access to JSON using Javascript Object Notation.


## Installation
```
pip install jsonjavascriptnotation
```

## Access to values

Lets image we have following JSON object.
```
{  
    "employee": {  
        "name":       "Mario",   
        "salary":      1000000
    }  
}  
```

The python way to access data inside JSON is using brackets and quotes like a normal dictionary.
```
import json
json_obj1 = json.loads(json_txt)
assert json_obj1['employee']['name'] == 'Mario'
assert json_obj1['employee']['salary'] == 1_000_000
```

Using the JSON wrapper you can access data like a normal object.
```
from jsonjavascriptnotation.json_wrapper import JONFactory
...
json_obj2 = JONFactory.wrap(json_obj1)
assert json_obj2.employee.name == 'Mario'
assert json_obj2.employee.salary == 1_000_000
```

## Changing values

Is also possible modify values and get json updated.
```
json_obj2.employee.name = 'Cesar'
json_obj2.employee.salary = 500_000

expected = '{"employee": {"name": "Cesar", "salary": 500000, "married": true, "occupation": "writer"}}'
 assert f'{json_obj2}' == expected
```

## Special symbols

Some JSON properties have special characters like '$', those are not accepted as property names.
This library remove automatically those from the names and put it back when you serialize to JSON.

For instance for the below example.
```
    {  
        "type": "array",
        "$id": "https://spec.openapis.org/oas/3.1/schema/2022-10-07",
        "then": {
          "$ref": "#/$defs/reference"
        }
    }  
```

You will be able to access like this:
```
json_obj1 = json.loads(json_txt)
json_obj2 = JONFactory.wrap(json_obj1)

assert json_obj2.type == 'array'
assert json_obj2.id == 'https://spec.openapis.org/oas/3.1/schema/2022-10-07'
assert json_obj2.then.ref == '#/$defs/reference'

expected = '{"type": "array", "$id": "https://spec.openapis.org/oas/3.1/schema/2022-10-07", "then": {"$ref": "#/$defs/reference"}}'
assert f'{json_obj2}' == expected
```