All Projects → MediaMath → scala-json

MediaMath / scala-json

Licence: Apache-2.0 License
Compile-time JSON marshaling and abstraction for Scala, Scala Native and Scala.js

Programming Languages

scala
5932 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to scala-json

oc-api-plugin
Base API Plugin for OctoberCMS
Stars: ✭ 26 (-56.67%)
Mutual labels:  serializer
xsdata
Naive XML & JSON Bindings for python
Stars: ✭ 144 (+140%)
Mutual labels:  serializer
microstream
High-Performance Java-Native-Persistence. Store and load any Java Object Graph or Subgraphs partially, Relieved of Heavy-weight JPA. Microsecond Response Time. Ultra-High Throughput. Minimum of Latencies. Create Ultra-Fast In-Memory Database Applications & Microservices.
Stars: ✭ 283 (+371.67%)
Mutual labels:  serializer
jsonapi-serializer-formats
💎 Gem to enrich jsonapi-serializer with multiple formats
Stars: ✭ 20 (-66.67%)
Mutual labels:  serializer
hprose-as3
Hprose for ActionScript 3.0
Stars: ✭ 18 (-70%)
Mutual labels:  serializer
jsonld-streaming-serializer.js
A fast and lightweight streaming JSON-LD serializer for JavaScript
Stars: ✭ 20 (-66.67%)
Mutual labels:  serializer
SaveManager
A simple, yet powerful binary serializer for persisting game data in Unity.
Stars: ✭ 36 (-40%)
Mutual labels:  serializer
Enzyme
An experimental .NET asymmetric serializer, designed for write-heavy enviroments with a synchronous flow.
Stars: ✭ 19 (-68.33%)
Mutual labels:  serializer
jsonapi-mapper
JSON API-Compliant Serialization for your Node ORM
Stars: ✭ 41 (-31.67%)
Mutual labels:  serializer
desert
Binary serialization library for Scala
Stars: ✭ 42 (-30%)
Mutual labels:  serializer
laravel5-hal-json
Laravel 5 HAL+JSON API Transformer Package
Stars: ✭ 15 (-75%)
Mutual labels:  serializer
better-serializer
General serializer for PHP. An alternative to JmsSerializer.
Stars: ✭ 27 (-55%)
Mutual labels:  serializer
hanami-serializer
Serializer library for hanami applications
Stars: ✭ 22 (-63.33%)
Mutual labels:  serializer
id-mask
IDMask is a Java library for masking internal ids (e.g. from your DB) when they need to be published to hide their actual value and to prevent forging. It has support optional randomisation has a wide support for various Java types including long, UUID and BigInteger. This library bases its security on strong cryptographic primitives.
Stars: ✭ 39 (-35%)
Mutual labels:  serializer
t1-python
Python SDK for MediaMath Platform APIs
Stars: ✭ 20 (-66.67%)
Mutual labels:  ignore-list
JsonFormatter
Easy, Fast and Lightweight Json Formatter. (Serializer and Deserializer)
Stars: ✭ 26 (-56.67%)
Mutual labels:  serializer
json-api-serializer
Node.js/browser framework agnostic JSON API (http://jsonapi.org/) serializer.
Stars: ✭ 141 (+135%)
Mutual labels:  serializer
config-loader
Simple C++ Config Loader Framework(Serialization & Reflection)
Stars: ✭ 87 (+45%)
Mutual labels:  serializer
git-ignore
An interactive CLI to generate .gitignore files (written in Rust)
Stars: ✭ 18 (-70%)
Mutual labels:  ignore-list
active mappers
The cleanest way to declare your Rails API view layer. Period.
Stars: ✭ 14 (-76.67%)
Mutual labels:  serializer

scala-json Known Vulnerabilities

import json._

@accessor case class Book(name: String, pages: Int, chapters: Seq[String])

Book("Making JSON Easy in Scala", 2, List("Getting Started, Fast", "Getting Back to Work")).js

res0: json.JObject =
{
  "name": "Making JSON Easy in Scala",
  "pages": 2,
  "chapters": ["Getting Started, Fast", "Getting Back to Work"]
}

Features

Compile time JSON marshalling of primitive values, case-classes, basic collections, and whatever you can imagine for scala, scala-native and scala-js.

  • Extensible accessor API. Serialize any type you want.
  • Provides a useful JS-like AST for intermediate JSON data.
  • Implicit accessors that chain to resolve Higher-Kind types (e.g. Option[T]).
  • Uses default fields correctly.
  • Preserves object field order.
  • Rich field exceptions with field names (all field errors, not just the first), perfect for form validation.
  • Ability to use non-string key types in a Map (for key types that serialize to JString).
  • Enables use of normal looking scala structures with any previously existing JSON API.
  • Produces pretty and human readable JSON from normal scala types.
  • Supports scala-js so you can extend your models to the web.
  • Supports scala-native so you can take your models everywhere else (requires jansson, available through apt, brew, etc).
  • Enables you to create readable APIs that match existing/specific class structure.
  • Exposes rich compile-time type info, more run-time type data than reflect could ever provide.
  • Uses existing scala collection CanBuildFrom factories to support buildable collections.
  • Provides support for unknown types (Any) via 'pickling' with a run-time class registry.
  • Support for scala 2.10.x, 2.11.x, 2.12.0-M3.
  • Support for scala-js 0.6.x.
  • Support for scala-native 0.1.x.

Docs

  • Usage and Examples - Getting started with basic usage and examples.
  • Accessors - Accessors are the compile-time constructs that allow you to go from a JValue to a scala type and back.
  • Registry - The Accessor Registry allows you to pickle registered types from untyped (Any) data.
  • Enumerator - Allows enumerated case object values of a sealed trait (useful for map keys).
  • EpochDeadline - Clone of scala's Deadline that serializes to numeric Unix epoch time.
  • Migration - Uses a version field in JSON to transform old schemas to new ones.
  • Scaladocs

SBT

resolvers += "mmreleases" at "https://artifactory.mediamath.com/artifactory/libs-release-global"

//scala
libraryDependencies += "com.mediamath" %% "scala-json" % "1.1"

//or scala + scala-js/scala-native
libraryDependencies += "com.mediamath" %%% "scala-json" % "1.1"

//for @accessor annotation support
resolvers += Resolver.sonatypeRepo("releases")
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)

Dependencies

  • macro-paradise 2.1.0+ required for @accessor annotation
  • jackson for JVM JSON string parsing
  • jansson for Scala Native JSON string parsing
  • re2 for fast and safe RegEx
  • µTest for testing
  • tut for doc building

Contributing

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].