Coder Social home page Coder Social logo

sjson's Introduction

sjson: Transparent JSON Serialization in Scala

sjson offers non intrusive serialization of Scala objects into JSON. You can use sjson to serialize built in types, the basic generic data types and any custom data type that you design. Two types of serialization are supported right now :-

  1. Reflection based that offers JSON serialization capabilities without any user intervention. You define your class, use some of the out-of-the-box annotations (if required) and invoke the serialization API
  2. Typeclass based, that defines a serialization protocol that needs to be implemented for custom data objects. For built-in types, the default protocol implementation comes out of the box. This is very much a work in progress and will evolve with time. The current implementation, however is fairly robust though not yet fully complete.

For more details of the implementation and sample examples, have a look at the wiki.

News

2011/09/01: sjson 0.15 released

  • fixed #37: Problem in typeclass based serialization using Seq
  • builds in Scala 2.9.1

2011/08/29: sjson 0.14 released

  • fixed a bug with serializing a combo of List, Map and Option
  • fixed #35: Need to distinguish between cases where we have a List of objects or a List of Maps
  • fixed #34: Bug in serializing structures where the OptionTypeHint is for a nested value
  • fixed #33: Bug in serializing composite structures like a List within a Map
  • fixed issue #32: Serializing case objects (singleton objects) using sjson
  • fixed #30: SJSON.toJSON() should handle primitive arrays
  • fixed issue #26: optionally remove empty objects & arrays from result
  • fixed #29 (debasishg#29)

2011/07/11: sjson 0.13 released

  • Bug fixes in reflection based API
  • Now compiles with scala 2.9.0-1
  • A few minor enhancements in typeclass based serialization

2011/05/16: sjson 0.12 released

  • Major improvements in reflection based API
  • De-serialization is more type-safe now – no need to cast
  • Improved deep serialization of generic structures in reflection based APIs
  • Improved test cases

2011/03/26: sjson 0.10 released

  • bug fixes in serialization of Enumerations and Options
  • builds with Scala 2.8.1 and Scala 2.9.0.RC1
  • refactoring of code
  • dependency on scalaz removed and moved to separate project sjson-scalaz

2010/09/16: sjson 0.8 released

  • type class based JSON serialization enhanced
  • fixed bug in reflection based serialization

2010/07/28: sjson 0.7 released

License

This software is licensed under the Apache 2 license, quoted below.

Licensed under the Apache License, Version 2.0 (the “License”); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.

sjson's People

Contributors

akraievoy avatar debasishg avatar epabst avatar sadache avatar wspringer avatar xuwei-k avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.