Monday, July 29, 2013

Serialization example using json4s & and a small github project for tests purposes

Once aware of json4s serialization limitations, it is quite simple to use :

{
  "receipts":[
    {
      "amount":15.0,
      "currency":{
        "jsonClass":"Euro"
      },
      "when":"2013-07-29T20:45:44.121Z",
      "where":{
        "jsonClass":"Address",
        "address":"XIII",
        "town":"Paris"
      },
      "what":"meal",
      "keywords":[
        "food",
        "4work"
      ]
    },
    {
      "amount":1.0,
      "currency":{
        "jsonClass":"Euro"
      },
      "when":"2013-07-29T20:45:44.121Z",
      "where":{
        "jsonClass":"Address",
        "address":"I",
        "town":"Paris"
      },
      "what":"bread",
      "keywords":[
        "food"
      ]
    }
  ],
  "description":"2013 archives"
}

No comments:

Post a Comment