xuwei-k / Play Json Extra
playframework2 json extra module. provide convenience functions for define Format, Reads, Writes
Stars: ✭ 20
Programming Languages
scala
5932 projects
Projects that are alternatives of or similar to Play Json Extra
Bebop
An extremely simple, fast, efficient, cross-platform serialization format
Stars: ✭ 305 (+1425%)
Mutual labels: json, serialization
Handyjson
A handy swift json-object serialization/deserialization library
Stars: ✭ 3,913 (+19465%)
Mutual labels: json, serialization
Kim
Kim: A JSON Serialization and Marshaling framework
Stars: ✭ 326 (+1530%)
Mutual labels: json, serialization
Kotlinx.serialization
Kotlin multiplatform / multi-format serialization
Stars: ✭ 3,550 (+17650%)
Mutual labels: json, serialization
Leopotamgrouplibraryunity
Tools library for unity 3d game engine: animator graph helpers, serialization (json), localization, event routing (eventbus, ui actions), embedded scripting, uGui xml markup, threading, tweening, in-memory protection and other helpers (pure C#)
Stars: ✭ 373 (+1765%)
Mutual labels: json, serialization
Thorsserializer
C++ Serialization library for JSON
Stars: ✭ 241 (+1105%)
Mutual labels: json, serialization
Flatcc
FlatBuffers Compiler and Library in C for C
Stars: ✭ 434 (+2070%)
Mutual labels: json, serialization
Fastjson
A fast JSON parser/generator for Java.
Stars: ✭ 23,997 (+119885%)
Mutual labels: json, serialization
Fspickler
A fast multi-format message serializer for .NET
Stars: ✭ 299 (+1395%)
Mutual labels: json, serialization
Jsonapi Rails
Rails gem for fast jsonapi-compliant APIs.
Stars: ✭ 242 (+1110%)
Mutual labels: json, serialization
Velocypack
A fast and compact format for serialization and storage
Stars: ✭ 347 (+1635%)
Mutual labels: json, serialization
Mashumaro
Fast and well tested serialization framework on top of dataclasses
Stars: ✭ 208 (+940%)
Mutual labels: json, serialization
Jsonapi Rb
Efficiently produce and consume JSON API documents.
Stars: ✭ 219 (+995%)
Mutual labels: json, serialization
Jsoniter Scala
Scala macros for compile-time generation of safe and ultra-fast JSON codecs
Stars: ✭ 410 (+1950%)
Mutual labels: json, serialization
play-json-extra
motivation and example
I think following way is so verbose.
import play.api.libs.json._
import play.api.libs.functional.syntax._
final case class User(id: Long, name: String)
object User {
implicit val format: OFormat[User] = (
(__ \ "id").format[Long] and // I want to omit `Long` and `String`
(__ \ "name").format[String]
)(apply _, Function.unlift(unapply))
}
Play provides Json macros. Yes it is useful, but I want to specify Json keys explicitly sometime like argonaut casecodecN
import play.api.libs.json._
import play.jsonext._
final case class User(id: Long, name: String)
object User {
implicit val format: OFormat[User] =
CaseClassFormats(apply _, unapply _)("id", "name")
}
latest stable version for play-json 2.8
libraryDependencies += "com.github.xuwei-k" %% "play-json-extra" % "0.8.0"
for scala-js
libraryDependencies += "com.github.xuwei-k" %%% "play-json-extra" % "0.8.0"
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].