Details

    • Type: Wish Wish
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JRuby 1.1.2
    • Component/s: Extensions
    • Labels:
      None
    • Number of attachments :
      2

      Description

      This is a request for someone in the community to implement Florian Frank's fast JSON library (http://rubyforge.org/projects/json/) using an equivalent Java library to produce a JRuby-compatible gem. I expect more and more folks are going to be using JSON as a wire format for remote APIs, and JRuby would suffer if we don't have an equivalent to Florian's json gem.

      1. parser_java.rl
        18 kB
        Marco Walther
      2. ParserService.java
        52 kB
        Marco Walther

        Activity

        Hide
        Gregory Murphy added a comment -

        I was the one who first asked about a JRuby port, I'll be happy to do some testing. I already have a few test suites for two different projects that I was using to test performance of the ActiveResource JSON implementation in Rails 2, and Florian's JSON gem. The tests involve serializing and de-serializing basic ActiveRecord models, so the JSON isn't that complicated.

        I'll add comments to this issue if I find any problems.

        Show
        Gregory Murphy added a comment - I was the one who first asked about a JRuby port, I'll be happy to do some testing. I already have a few test suites for two different projects that I was using to test performance of the ActiveResource JSON implementation in Rails 2, and Florian's JSON gem. The tests involve serializing and de-serializing basic ActiveRecord models, so the JSON isn't that complicated. I'll add comments to this issue if I find any problems.
        Hide
        Gregory Murphy added a comment -

        Where is the gem? I scoured the JRuby project page and wiki, and the jruby-extras and json projects at RubyForge, couldn't find it.

        Show
        Gregory Murphy added a comment - Where is the gem? I scoured the JRuby project page and wiki, and the jruby-extras and json projects at RubyForge, couldn't find it.
        Hide
        Daniel Luz added a comment -

        It's on the "JSON-JRuby" (not a very creative name) project:
        http://rubyforge.org/projects/json-jruby/

        Show
        Daniel Luz added a comment - It's on the "JSON-JRuby" (not a very creative name) project: http://rubyforge.org/projects/json-jruby/
        Hide
        Charles Oliver Nutter added a comment -

        I'm going to mark this fixed, since the json-jruby gem has been out for a while. Hopefully it will get integrated into the native gem, so there's a single place to install from, but this is a solved problem now.

        Show
        Charles Oliver Nutter added a comment - I'm going to mark this fixed, since the json-jruby gem has been out for a while. Hopefully it will get integrated into the native gem, so there's a single place to install from, but this is a solved problem now.
        Hide
        wenshao added a comment -

        fastjson 1.1.2 is fast!

        the benchmark test results:
        ------------------------
        serialize deserialize size compressed size
        java serialize 8654 43787 889 541
        hessian 6725 10460 501 313
        protobuf 2964 1745 239 149
        thrift 3177 1949 349 197
        avro 3520 1948 221 133
        json-lib 45788 149741 485 263
        jackson 3052 4161 503 271
        fastjson 2595 1472 468 251

        ----------------------

        How to get it?

        If you're Maven user, just use our maven repository(http://code.alibabatech.com/mvn/releases/) with folloging dependency

        <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>fastjson</artifactId>
        <version>1.1.2</version>
        </dependency>
        Downlaods

        Binary : http://code.alibabatech.com/mvn/releases/com/alibaba/fastjson/1.1.2/fastjson-1.1.2.jar
        Source :http://code.alibabatech.com/mvn/releases/com/alibaba/fastjson/1.1.2/fastjson-1.1.2-sources.jar
        Subversion : http://code.alibabatech.com/svn/fastjson/trunk/fastjson/

        Show
        wenshao added a comment - fastjson 1.1.2 is fast! the benchmark test results: ------------------------ serialize deserialize size compressed size java serialize 8654 43787 889 541 hessian 6725 10460 501 313 protobuf 2964 1745 239 149 thrift 3177 1949 349 197 avro 3520 1948 221 133 json-lib 45788 149741 485 263 jackson 3052 4161 503 271 fastjson 2595 1472 468 251 ---------------------- How to get it? If you're Maven user, just use our maven repository( http://code.alibabatech.com/mvn/releases/ ) with folloging dependency <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.1.2</version> </dependency> Downlaods Binary : http://code.alibabatech.com/mvn/releases/com/alibaba/fastjson/1.1.2/fastjson-1.1.2.jar Source : http://code.alibabatech.com/mvn/releases/com/alibaba/fastjson/1.1.2/fastjson-1.1.2-sources.jar Subversion : http://code.alibabatech.com/svn/fastjson/trunk/fastjson/

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Charles Oliver Nutter
          • Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: