ghyll


License

License

MIT
GroupId

GroupId

com.gaborpihaj
ArtifactId

ArtifactId

ghyll_2.13
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

ghyll
ghyll
Project URL

Project URL

https://github.com/voidcontext/ghyll
Project Organization

Project Organization

com.gaborpihaj
Source Code Management

Source Code Management

https://github.com/voidcontext/ghyll

Download ghyll_2.13

How to add to project

<!-- https://jarcasting.com/artifacts/com.gaborpihaj/ghyll_2.13/ -->
<dependency>
    <groupId>com.gaborpihaj</groupId>
    <artifactId>ghyll_2.13</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.gaborpihaj/ghyll_2.13/
implementation 'com.gaborpihaj:ghyll_2.13:0.1.0'
// https://jarcasting.com/artifacts/com.gaborpihaj/ghyll_2.13/
implementation ("com.gaborpihaj:ghyll_2.13:0.1.0")
'com.gaborpihaj:ghyll_2.13:jar:0.1.0'
<dependency org="com.gaborpihaj" name="ghyll_2.13" rev="0.1.0">
  <artifact name="ghyll_2.13" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.gaborpihaj', module='ghyll_2.13', version='0.1.0')
)
libraryDependencies += "com.gaborpihaj" % "ghyll_2.13" % "0.1.0"
[com.gaborpihaj/ghyll_2.13 "0.1.0"]

Dependencies

compile (6)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.13.3
org.typelevel : cats-core_2.13 jar 2.3.0
org.typelevel : cats-effect_2.13 jar 2.3.0
co.fs2 : fs2-core_2.13 jar 2.4.6
com.google.code.gson : gson jar 2.8.6
com.chuusai : shapeless_2.13 jar 2.3.3

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.13 jar 3.2.3

Project Modules

There are no modules declared in this project.

ghyll Scala CI

ghyll is a streaming JSON decoder library for Scala

Overview

In some cases datasets are not nicely organised into an array that's easy to parse in a streaming fashion with existing libraries (e.g. circe-fs2). When the dataset is represented as a huge map/object/hash where keys are e.g. identifiers it's not feasible to read the whole JSON into the memory and/or build a full AST representing the data. Another scenario when this approach can get problematic (or resource intensive) when only a small subset/subtree of a JSON object needs to be decoded.

ghyll provides a way to parse and decode:

  • large JSON objects as key-value pairs, where there are many keys and the payload under each key is smaller
  • large JSON arrays
  • large JSON objects that only partially need to be decoded

Note: ghyll currently doesn't support encoding data as JSON

How it works

Under the hood ghyll is using gson for parsing the JSON payload, then it's using its own Decoder implementation to turn the JSON tokens emitted by gson into Scala data structures.

Disclaimer

ghyll is under active development and it's in an early stage when its functionality is limited and the API can change substantially.

Versions

Version
0.1.0