Skip to content

jruusu/scala-lazyjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scala-lazyjson

A very simple, very incomplete Scala wrapper for LazyJSON - a very fast, very lazy JSON parser for Java.

Usage

import lazyjson._

val json =
  """{
    |  "data": [
    |    {
    |      "id": "a-001",
    |      "title": "Example A 001"
    |    },
    |    {
    |      "id": "b-001",
    |      "title": "Example B 001"
    |    },
    |    {
    |      "id": "c-001",
    |      "title": "Example C 001"
    |    }
    |  ]
    |}"""

LazyObject(json)
  .getAs[LazyArray]("data")
  .collect {
    case o: LazyObject => o.getAs[String]("title")
  }

// res0: Seq[String] = List(Example A 001, Example B 001, Example C 001)

About

A very simple Scala wrapper for LazyJSON

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages