A package that manages JN formatted files (CustJSON specific JSON varient)
Project description
CustJSON
A python package that makes its own little custom variant of JSON. Still easy to read, just no nested values (yet)
WARNING
By using this package, the code writer does not take responsibility if you use this package and data gets leaked or stolen due to the CustJSON format being plain text.
Usage
Opening, Closing, Deleting and Creating files
To start using the package, make an initialization object using this code:
i = custjson.Init()
This line of code initializes the package's features, which by proxy means you have to run CustJSON's functions via i.function(foo,bar)
To create a file directly and load it into the package's memory, type:
i.create_file("filename-without-extension")
Replace "filename-without-extension" with the filename of your choice WITHOUT THE EXTENSION. It automatically assigns the file a .jn extension.
To load a file that already exists to the package's memory, type:
i.open_file("path/to/file/filename.jn")
Again, replace "path/to/file/filename.jn" with the path to your file (including your file AND the .jn extension.)
To delete a file, make sure it's loaded in memory, and then type:
i.delete_file()
To close a file, it's the same process, but with a different command. Type:
i.close_file()
Reading and Writing to files
To read and write to .JN files, you first have to load them into CustJSON's memory as shown before, then you can simply use the commands
i.read_value_from_name("valueNameHere")
i.read_line(lineNumber)
Replace each placeholder with its respective value, for example if you wanted to get the value of the key "space", you'd do:
i.read_value_from_name("space")
and replace lineNumber with... the line number you want to read from the current file...
You have now learned how to use CustJSON. Yaaay!
Changelog
v. 0.1.1: Fixed a bug with the value reader not being coded properly. Woops!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file custjson-0.1.1.tar.gz
.
File metadata
- Download URL: custjson-0.1.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
a4f0bbe8e526b9de34cf9bb35068bff60535af276c4d85631949cc156bbf42d0
|
|
MD5 |
6bcf8f5e382e619bede451ef20755e9e
|
|
BLAKE2b-256 |
a1f2d0765cc90113ad078aa0fcb8eec314030142522b44be9c00fac7d3161946
|
File details
Details for the file custjson-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: custjson-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
a5d50cce3858cc728c455ece9acd6d060b86942ebc00e7b8a6e524f5451dd090
|
|
MD5 |
293bc801e656cb18c35a64efacf29381
|
|
BLAKE2b-256 |
193ef0d75cb0b88cc0ac1d12f7739a2db8f9f0f45fc077af436bf5f95b6f9efa
|