https://github.com/pixeyehq/px.nim.pods
PODS implementation in Nim language.
https://github.com/pixeyehq/px.nim.pods
Last synced: 6 months ago
JSON representation
PODS implementation in Nim language.
- Host: GitHub
- URL: https://github.com/pixeyehq/px.nim.pods
- Owner: PixeyeHQ
- License: mit
- Created: 2023-07-15T23:58:54.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T19:28:41.000Z (12 months ago)
- Last Synced: 2025-02-13T22:38:20.924Z (8 months ago)
- Language: Nim
- Homepage:
- Size: 173 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# px.nim.pods
Easy to read and type text format for serialization and config files. This is Nim implementation.
You can read about PODS here: https://github.com/PixeyeHQ/pods## How to use it?
I encourage you to look in the example folder to find some examples of how to work with PODS in nim.
Use `pods` object hook to get API commands. `pods` is used as API hook.
Use `PxPods` to get access to module types. (Not strictly necessary, but I like using namespaces :))
```nim
type Vector3 = object
x: int
y: int
z: intlet path = os.getAppDir()
let sparsePath = &"{path}/sparse.pods" # your file name
var position = Vector3(x:10,y:10,z:1)
var pod = pods.initPodObject()
pod["position"] = pods.toPod(position)
pods.toPodFile(sparsePath, pod, PxPods.PodStyle.Sparse)
```
## Usage / Contribution
The code may contain bugs and it lacks proper debugging and tests. It's still for personal use and may be rough on edges.
If you like the concept & idea than documentation, bug reports, pull requests or any other contributions are strongly welcome!