1 Reply Latest reply on Sep 8, 2010 4:09 AM by Immo Benjes

    Problems with RestEasy and JSON

    Immo Benjes Newbie


      I am using RestEasy to marchal entities to JSON. That works okay but somehow every thing is represented as a String.

      public class TestObject {
          private Long value;
          public Long getValue(){
              return value;

      Instead of creating something like:

      It creates

      So the long value is converted into a String. How can I avoid that?



        • 1. Re: Problems with RestEasy and JSON
          Immo Benjes Newbie


          I've asked this question on the Jackson mailing list which does the JSON marchaling for RestEASY but they said that this couldn't be a Jackson problem. It is more likely caused by converting the entity first to xml and then to JSON.

          Can anyone help me with this? I can't be the only one who wants to use numbers (Long, Integer) etc. in JSON with RestEASY.