https://github.com/jruusu/scala-lazyjson
A very simple Scala wrapper for LazyJSON
https://github.com/jruusu/scala-lazyjson
json json-parser scala-library
Last synced: 3 months ago
JSON representation
A very simple Scala wrapper for LazyJSON
- Host: GitHub
- URL: https://github.com/jruusu/scala-lazyjson
- Owner: jruusu
- License: apache-2.0
- Created: 2018-02-04T11:14:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-04T15:08:15.000Z (over 8 years ago)
- Last Synced: 2025-10-09T06:39:49.314Z (9 months ago)
- Topics: json, json-parser, scala-library
- Language: Scala
- Size: 13.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# scala-lazyjson
A very simple, very incomplete Scala wrapper for [LazyJSON](https://github.com/doubledutch/LazyJSON) - *a very fast, very lazy JSON parser for Java*.
## Usage
```scala
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)
```