Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chobeat/scala-json-feed
Library to handle and validate documents in JSONFeed format
https://github.com/chobeat/scala-json-feed
json jsonfeed parser validator
Last synced: 19 days ago
JSON representation
Library to handle and validate documents in JSONFeed format
- Host: GitHub
- URL: https://github.com/chobeat/scala-json-feed
- Owner: chobeat
- License: gpl-3.0
- Created: 2017-08-11T11:56:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-16T07:46:52.000Z (over 7 years ago)
- Last Synced: 2024-11-08T05:41:13.102Z (2 months ago)
- Topics: json, jsonfeed, parser, validator
- Language: Scala
- Size: 38.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
scala-json-feed offers support for the [JSONFeed](https://jsonfeed.org) format and makes it easily usable in Scala.
The project is currently WIP and the first goal is to achieve full support of the format and correct validation.
Feel free to contribute with ideas, code and requests.
This is my first published and supported library so any criticism on the API, build and release methods are welcome.
# Example
## Parsing
```scala
import scalajsonfeed.core.JSONFeedParser._
val input:String = """
{
"title":"a title",
"items":[
{
"id":"1",
"tags":[
"a",
"b",
"c"
],
"content_text":"content"
},
{
"id":"2",
"content_text":"some other content"
}
]
}
"""
val result = parse(input)result.foreach(d => {
println(s"Title: ${d.title}")
})
```