Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
flamendless committed May 20, 2020
1 parent 09dc7b4 commit 016e85e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

A library-companion to register custom data types that can be encoded and decoded for [json.lua](https://github.com/rxi/json.lua).

## Why Arson?

It is from `RSON`, which is derived from `Register-JSON`. I know it does not make any sense. But is sounds cool.

## How to use:

Expand All @@ -28,7 +25,7 @@ local my_custom_class = {

## API

* Arson.register - register your own custom data/class that can be encoded and decoded
* **Arson.register** - register your own custom data/class that can be encoded and decoded

Example:
```lua
Expand All @@ -45,7 +42,7 @@ arson.register("custom_vec2_class",
```
---

* Arson.unregister - unregister an already added custom data/class
* **Arson.unregister** - unregister an already added custom data/class

Example:
```lua
Expand All @@ -57,7 +54,7 @@ arson.unregister("custom_vec2_class")
```
---

* Arson.encode - encode a table
* **Arson.encode** - encode a table

Example:
```lua
Expand Down Expand Up @@ -85,7 +82,7 @@ local str_json = json.encode(custom_data)
```
---

* Arson.decode - decode a table. It will modify the table passed as it will replace custom data with the decoded one
* **Arson.decode** - decode a table. It will modify the table passed as it will replace custom data with the decoded one

Example:
```lua
Expand All @@ -100,6 +97,10 @@ arson.decode(json_decoded)
```
---

## Why Arson?

It is from `RSON`, which is derived from `Register-JSON`. I know it does not make any sense. But is sounds cool.

## LICENSE

See MIT License [file here](https://github.com/flamendless/arson.lua/blob/master/LICENSE)

0 comments on commit 016e85e

Please sign in to comment.