Skip to content

sravya-123/jsonapi-scala

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http://jsonapi.org/ implementation in scala

Build Status Coverage Status

Features

  • Automatic generation of jsonapi json writers with relationship handling for case classes

Example

@jsonApiResource final case class Company(id: String, name: String, employees: ToMany[Employee])
@jsonApiResource final case class Employee(id: String, name: String)

val acme = Company("1", "acme", ToMany.loaded(Employee("1", "number one 1")))

val json = JsonApiSupport.rawOne(acme)
val parsed = JsonApiSupport.readOne(json)

json == parsed // true

Known issues

  • loop handing on reader side (relationship path has to be given manually)

About

jsonapi.org library for scala

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%