Json-lib news - No Fluff Just Stuff

Json-lib news

Posted by: Andres Almiray on April 14, 2008

It's been a while since I blogged about Json-lib so here goes what has happened since last time. One of the most sought features for 2.2.1 (besides generics) was handling XML -> JSON conversion as expected when encountering a "top level" object that happened to have 1 single child. Problem is that that XML is also a valid top level array, so an artificial way to differentiate both cases had to be implemented, thanks to a simple flag the job was done, or was it? turns out the feature was not completely done, but I'm happy to say that now it finally is (thanks to some users pointing out a missing corner case).

Json-lib supports both Groovy and JRuby for quite a while, perhaps you saw in the news that JRuby 1.1 was released a couple of weeks ago, well Groovy 1.5.5 was released today, that prompt me to download both versions and upgrade Json-lib's dependencies along the way. Speaking of Groovy, previously to version 2.2.1 Json-lib would automatically enhance classes to use the as keyword to perform type conversions, but as Kohsuke noted, it broke Hudson in unexpected ways (MetaClass magic gone bad) so from that release onward it no longer enhances classes unless you tell it so, which by the way is quite easy



There have been other issues that have been solved as well but I think these are the more relevant to mention for now, as I'm still looking for a way to add generics to the library.
Andres Almiray

About Andres Almiray

Andres is a Java/Groovy developer and a Java Champion with more than 20 years of experience in software design and development. He has been involved in web and desktop application development since the early days of Java. Andres is a true believer in open source and has participated on popular projects like Groovy, Griffon, and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member of the Griffon framework and Hackergarten community event. https://ch.linkedin.com/in/aalmiray

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »