https://github.com/nryanov/json-serde
Example of usage antlr4 and shapeless
https://github.com/nryanov/json-serde
antlr4 deriving example json shapeless
Last synced: 10 months ago
JSON representation
Example of usage antlr4 and shapeless
- Host: GitHub
- URL: https://github.com/nryanov/json-serde
- Owner: nryanov
- Created: 2020-08-04T13:31:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-07T22:27:26.000Z (over 4 years ago)
- Last Synced: 2025-02-13T19:16:32.040Z (12 months ago)
- Topics: antlr4, deriving, example, json, shapeless
- Language: Scala
- Homepage:
- Size: 47.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# json-serde
Json grammar source: https://github.com/antlr/grammars-v4/blob/master/json/JSON.g4
## Test
```shell script
sbt test
```
## Benchmark
```shell script
sbt becnh:test
```
## Benchmark results
```markdown
cores: 4
hostname: MAC
name: OpenJDK 64-Bit Server VM
osArch: x86_64
osName: Mac OS X
vendor: Oracle Corporation
version: 11.0.2+9
```
### json-serde
```markdown
::Benchmark jsonserde.serialize::
Parameters(size -> 100000): 106.39798 ms
::Benchmark jsonserde.deserialize::
Parameters(size -> 100000): 7185.609219 ms
```
### circe
```markdown
::Benchmark circe.serialize::
Parameters(size -> 100000): 177.150326 ms
::Benchmark circe.deserialize::
Parameters(size -> 100000): 4.534527 ms
```