My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Last 30 days

  • Dec 24, 2009
    issue 28 (marshalling defined for class should also work with collecti...) Status changed by pascallouisperez   -   You'll want to do TwoLattes.withType(URLType.class).createMarshaller(Complex.class); to make this example work. This is the intended behaviour.
    Status: WontFix
    You'll want to do TwoLattes.withType(URLType.class).createMarshaller(Complex.class); to make this example work. This is the intended behaviour.
    Status: WontFix
  • Dec 24, 2009
    issue 28 (marshalling defined for class should also work with collecti...) reported by nabil.shams   -   Entity: @Entity public class Complex { @Value(type = com.twolattes.json.types.URLType.class) public List<URL> urlList; public static void main(String args[]) { try{ Complex c = new Complex(); c.urlList = new ArrayList<URL>(); c.urlList.add(new URL("http","www.google.com",8080,"")); c.urlList.add(new URL("http","www.yahoo.com",8080,"")); Marshaller<Complex> m = TwoLattes.createMarshaller(Complex.class); Json.Object obj = m.marshall(c); System.out.println(obj); } catch(Exception ex) { System.out.println(ex.getMessage()); } } } JSON: What is the expected output? What do you see instead? expected output: {"urlList":["http://www.google.com:8080","http://www.yahoo.com:8080"] I see null, and the exception is mentioned below. Please provide any additional information below. I am having the following exception right now: java.lang.ClassCastException
    Entity: @Entity public class Complex { @Value(type = com.twolattes.json.types.URLType.class) public List<URL> urlList; public static void main(String args[]) { try{ Complex c = new Complex(); c.urlList = new ArrayList<URL>(); c.urlList.add(new URL("http","www.google.com",8080,"")); c.urlList.add(new URL("http","www.yahoo.com",8080,"")); Marshaller<Complex> m = TwoLattes.createMarshaller(Complex.class); Json.Object obj = m.marshall(c); System.out.println(obj); } catch(Exception ex) { System.out.println(ex.getMessage()); } } } JSON: What is the expected output? What do you see instead? expected output: {"urlList":["http://www.google.com:8080","http://www.yahoo.com:8080"] I see null, and the exception is mentioned below. Please provide any additional information below. I am having the following exception right now: java.lang.ClassCastException
  • Dec 21, 2009
    r115 (Updating preferences to the latest version of Eclipse (Galil...) committed by jaredjacobs   -   Updating preferences to the latest version of Eclipse (Galileo). Specifying ISO-8859-1 as the project source encoding and \n as the line terminator. Adding a spelling dictionary.
    Updating preferences to the latest version of Eclipse (Galileo). Specifying ISO-8859-1 as the project source encoding and \n as the line terminator. Adding a spelling dictionary.
  • Dec 21, 2009
    r114 (Addressing review comments for r113.) committed by jaredjacobs   -   Addressing review comments for r113.
    Addressing review comments for r113.
  • Dec 10, 2009
    issue 27 (Exception not properly bubbled when using getter/setter) reported by pascallouisperez   -   @Entity class BubbleMe { @Value int getFoo() { throw new RuntimeException(); } } TwoLattes.createMarshaller(BubbleMe.class).marshall(new BubbleMe()); will result in InvocationTargetException instead of RuntimeException.
    @Entity class BubbleMe { @Value int getFoo() { throw new RuntimeException(); } } TwoLattes.createMarshaller(BubbleMe.class).marshall(new BubbleMe()); will result in InvocationTargetException instead of RuntimeException.
  • Dec 09, 2009
    Options (options) Wiki page commented on by goo...@thenoid.nl   -   I'm writiting some documentation about how to handle interfaces, using the options _discriminatorName_, _discriminator_ and _subclasses_
    I'm writiting some documentation about how to handle interfaces, using the options _discriminatorName_, _discriminator_ and _subclasses_
  • Dec 08, 2009
    r113 (adding support for Marshaller<Long>, Marshaller<String>, and...) committed by jaredjacobs   -   adding support for Marshaller<Long>, Marshaller<String>, and other simple Java value types, as well as Java enum types. the Marshaller interface has changed in two ways: marshall(Json.Object) => marshall(Json.Value) and unmarshall(T) now returns Json.Value instead of Json.Object. the latter change is backwards incompatible. the old signatures are preserved in a new EntityMarshaller interface that refines Marshaller. clients that want to upgrade and use the result of unmarshall as Json.Object without casting from Json.Value are encouraged to use the EntityMarshaller interface, which TwoLattes.createEntityMarshaller returns.
    adding support for Marshaller<Long>, Marshaller<String>, and other simple Java value types, as well as Java enum types. the Marshaller interface has changed in two ways: marshall(Json.Object) => marshall(Json.Value) and unmarshall(T) now returns Json.Value instead of Json.Object. the latter change is backwards incompatible. the old signatures are preserved in a new EntityMarshaller interface that refines Marshaller. clients that want to upgrade and use the result of unmarshall as Json.Object without casting from Json.Value are encouraged to use the EntityMarshaller interface, which TwoLattes.createEntityMarshaller returns.
  • Dec 06, 2009
    r112 (fixing typo) committed by jaredjacobs   -   fixing typo
    fixing typo
  • Dec 03, 2009
    issue 1 (Top level entity does not need to have a no argument constru...) commented on by goo...@thenoid.nl   -   The same goes for interfaces and abstract classes, this error is a bit silly: interface logisticchain.network.NetworkNode does not have a no argument constructor. Of course an interface does not have a constructor...
    The same goes for interfaces and abstract classes, this error is a bit silly: interface logisticchain.network.NetworkNode does not have a no argument constructor. Of course an interface does not have a constructor...

Older

  • Dec 02, 2009
    issue 26 (Support top-level marshalling of Java Number, String, and Bo...) commented on by pascallouisperez   -   Currently the JsonMarshaller alllows marshalling of entities only. This issue is about extending it to allow marhsalling values, as if they were top-level entities.
    Currently the JsonMarshaller alllows marshalling of entities only. This issue is about extending it to allow marhsalling values, as if they were top-level entities.
  • Dec 02, 2009
    issue 26 (Support top-level marshalling of Java Number, String, and Bo...) commented on by reich.markus   -   I don't understand the comment by pascallouisperez? Is it possible to marshall a List<Double> for example?
    I don't understand the comment by pascallouisperez? Is it possible to marshall a List<Double> for example?
  • Nov 28, 2009
    issue 24 (Deploy to Maven repository) commented on by pascallouisperez   -   Yura, do you want to volunteer? It is very unlikely that current contributors would resolve this issue as none uses Maven.
    Yura, do you want to volunteer? It is very unlikely that current contributors would resolve this issue as none uses Maven.
  • Nov 28, 2009
    issue 26 (Support top-level marshalling of Java Number, String, and Bo...) commented on by pascallouisperez   -   For the example given, Long.TYPE should also work. We'd also want to have registered types working that way System.out.println( TwoLattes .withType(IdType.class) .createMarshaller(Id.class) .marshallList(asList(new Id(5), new Id(8))) .toString());
    For the example given, Long.TYPE should also work. We'd also want to have registered types working that way System.out.println( TwoLattes .withType(IdType.class) .createMarshaller(Id.class) .marshallList(asList(new Id(5), new Id(8))) .toString());
  • Nov 28, 2009
    issue 26 (Support top-level marshalling of Java Number, String, and Bo...) reported by jaredjacobs   -   What steps will reproduce the problem? System.out.println( TwoLattes.createMarshaller(Long.class) .marshallList(asList(123L, 9876543210L)) .toString()); What is the expected output? What do you see instead? Expected: [123,9876543210] Actual: java.lang.IllegalArgumentException: class java.lang.Long is not an entity. Entities must be annotated with @Entity. at com.twolattes.json.DescriptorFactory.create(DescriptorFactory.java:30) at com.twolattes.json.MarshallerImpl.<init>(MarshallerImpl.java:23) at com.twolattes.json.TwoLattes$Builder.createMarshaller(TwoLattes.java:60) at com.twolattes.json.TwoLattes.createMarshaller(TwoLattes.java:27) ...
    What steps will reproduce the problem? System.out.println( TwoLattes.createMarshaller(Long.class) .marshallList(asList(123L, 9876543210L)) .toString()); What is the expected output? What do you see instead? Expected: [123,9876543210] Actual: java.lang.IllegalArgumentException: class java.lang.Long is not an entity. Entities must be annotated with @Entity. at com.twolattes.json.DescriptorFactory.create(DescriptorFactory.java:30) at com.twolattes.json.MarshallerImpl.<init>(MarshallerImpl.java:23) at com.twolattes.json.TwoLattes$Builder.createMarshaller(TwoLattes.java:60) at com.twolattes.json.TwoLattes.createMarshaller(TwoLattes.java:27) ...
  • Nov 28, 2009
    OrgJsonToJsonValue (comparison of org.json to Json.Value and help on transitioni...) Wiki page commented on by jaredjacobs   -   Nikolas, use a Marshaller<Book> to convert automatically from Book to Json.Value. {{{ static final Marshaller<Book> bookMarshaller = TwoLattes.createMarshaller(Book.class); ... List<Book> library = ...; Json.Array array = bookMarshaller.marshallList(library); response.getWriter().write(array.toString()); }}}
    Nikolas, use a Marshaller<Book> to convert automatically from Book to Json.Value. {{{ static final Marshaller<Book> bookMarshaller = TwoLattes.createMarshaller(Book.class); ... List<Book> library = ...; Json.Array array = bookMarshaller.marshallList(library); response.getWriter().write(array.toString()); }}}
  • Nov 27, 2009
    r111 (fixing inconsistent email address in test case) committed by jaredjacobs   -   fixing inconsistent email address in test case
    fixing inconsistent email address in test case
  • Nov 27, 2009
    issue 6 (Support marshalling of Collection and Map as top-level entit...) changed by jaredjacobs   -   fixed in r110
    Status: Fixed
    Owner: jaredjacobs
    Labels: Type-Enhancement Type-Defect
    fixed in r110
    Status: Fixed
    Owner: jaredjacobs
    Labels: Type-Enhancement Type-Defect
  • Nov 27, 2009
    r110 (Issue 6: Adding support for marshalling and unmarshalling to...) committed by jaredjacobs   -   Issue 6 : Adding support for marshalling and unmarshalling top-level string-keyed entity maps. Also reducing the running time of unmarshalling lists from O(n^2) to O(n), optimizing for empty collections, and improving a bit of Javadoc.
    Issue 6 : Adding support for marshalling and unmarshalling top-level string-keyed entity maps. Also reducing the running time of unmarshalling lists from O(n^2) to O(n), optimizing for empty collections, and improving a bit of Javadoc.
  • Nov 20, 2009
    r109 (encoding Unicode control characters that don't have a shorth...) committed by jaredjacobs   -   encoding Unicode control characters that don't have a shorthand representation as escape sequences, as required by the JSON spec at json.org
    encoding Unicode control characters that don't have a shorthand representation as escape sequences, as required by the JSON spec at json.org
  • Aug 26, 2009
    issue 25 (class loading presents problems with custom classloaders) commented on by jstabile.hidlabs   -   You're welcome. The best way to fix this is to not call Class.forName(). Gets you out of class loading 'hell' and if that can be done by removing the dependency on ASM, you resolve 2 issues! Note: The link above that you mentioned talks about getting the class loader context from the current thread. In my example, that would work, but does put an extra burden on the user of the library to set the thread's context class loader. In my code, I had to have code like: ClassLoader clSave = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(myClassLoader); // call Json library functions } finally { Thread.currentThread().setContextClassLoader(clSave); } Not a big deal, but it isn't as seamless as just removing the dependency on Class.forName(). Jim
    You're welcome. The best way to fix this is to not call Class.forName(). Gets you out of class loading 'hell' and if that can be done by removing the dependency on ASM, you resolve 2 issues! Note: The link above that you mentioned talks about getting the class loader context from the current thread. In my example, that would work, but does put an extra burden on the user of the library to set the thread's context class loader. In my code, I had to have code like: ClassLoader clSave = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(myClassLoader); // call Json library functions } finally { Thread.currentThread().setContextClassLoader(clSave); } Not a big deal, but it isn't as seamless as just removing the dependency on Class.forName(). Jim
  • Aug 25, 2009
    issue 25 (class loading presents problems with custom classloaders) commented on by pascallouisperez   -   This came up recently http://groups.google.com/group/jsonmarshaller/browse_thread/thread/bed1bbded6a1f881 and I proposed modifying the JsonMarshaller to be able to provide the class loader that the library should use. Removing the dependency on ASM would, I'm quite sure, also address this issue since no classes will need to be loaded by name. Thanks for the example, it is always nice to have a reproducible example!
    This came up recently http://groups.google.com/group/jsonmarshaller/browse_thread/thread/bed1bbded6a1f881 and I proposed modifying the JsonMarshaller to be able to provide the class loader that the library should use. Removing the dependency on ASM would, I'm quite sure, also address this issue since no classes will need to be loaded by name. Thanks for the example, it is always nice to have a reproducible example!
  • Aug 22, 2009
    r108 (Adding a JSON visitor with a default value.) committed by julien.wetterwald   -   Adding a JSON visitor with a default value.
    Adding a JSON visitor with a default value.
  • Aug 20, 2009
    issue 25 (class loading presents problems with custom classloaders) reported by jstabile.hidlabs   -   Hi, This is somewhat of a complicated issue, so let me explain with an example and then I'll give some references and example code. I've been using jsonmarshaller with great success and it is a nice package (hoping to see a 1.0 release at some point with the asm stuff removed). The issue is that both EntitySignatureVistor.java and ValueAnnotationVisitor.java contain calls to Class.forName(). This works fine if json-xx.jar is in the same class loader as the application, but fails if they are in different class loaders. As an example: Assume classes C1 and C2 are entities (with @Entity) along with the class Test. C1 has C2 as a member. Also assume that json-xx.jar is loaded in classloader CLa and that C1,C2, and Test are all loaded in classloader CLb. When Test runs, it can successfully marshal C2 just fine; however, it cannot marshal C1, because it blows up with a ClassNotFound Exception. Why? Because the json-xx.jar is loaded in CLb and is trying to find class C2 via a call to Class.forName() in EntitySignatureVistor.java I've created a sample test case for this to show. Attached is files.tar. To use, just untar and run the script 'test-noclassloader' -- that works just fine. Now run the script 'test-classloader' and it blows up. I've run this on Linux and a Mac. Here are some ideas and thoughts: 1. Here is a web page that talks about this problem in detail: http://www.javaworld.com/javaworld/javaqa/2003-06/01-qa-0606-load.html?page=1 It exactly describes this issue. 2. Modify the source of jsonmarshaller to not call Class.forName() at all (can you just get the class by getting the class of the member itself, not using the name?) 3. Modify the source to use the current thread's context class loader (I actually hacked the source and got this to work, but it was a hack). You could use some of the ideas in (1) 4. Modify the source to try to get the class by using the current Class.forName() and if that fails (throws ClassNotFoundException), then try Class.forName(name, true, loader) where loader is obtained by Thread().currentThread().getContextClassLoader() before giving up. This might be the easiest/best way to deal with this issue. Of course, applications like the sample one would have to set the current thread's ContextClassLoader, but at least it would work. Remember there are 2 places where Class.forName() is called and both need to be looked at. I hope this helps. Feel free to contact me if you have questions/issues/... Jim Stabile
    Hi, This is somewhat of a complicated issue, so let me explain with an example and then I'll give some references and example code. I've been using jsonmarshaller with great success and it is a nice package (hoping to see a 1.0 release at some point with the asm stuff removed). The issue is that both EntitySignatureVistor.java and ValueAnnotationVisitor.java contain calls to Class.forName(). This works fine if json-xx.jar is in the same class loader as the application, but fails if they are in different class loaders. As an example: Assume classes C1 and C2 are entities (with @Entity) along with the class Test. C1 has C2 as a member. Also assume that json-xx.jar is loaded in classloader CLa and that C1,C2, and Test are all loaded in classloader CLb. When Test runs, it can successfully marshal C2 just fine; however, it cannot marshal C1, because it blows up with a ClassNotFound Exception. Why? Because the json-xx.jar is loaded in CLb and is trying to find class C2 via a call to Class.forName() in EntitySignatureVistor.java I've created a sample test case for this to show. Attached is files.tar. To use, just untar and run the script 'test-noclassloader' -- that works just fine. Now run the script 'test-classloader' and it blows up. I've run this on Linux and a Mac. Here are some ideas and thoughts: 1. Here is a web page that talks about this problem in detail: http://www.javaworld.com/javaworld/javaqa/2003-06/01-qa-0606-load.html?page=1 It exactly describes this issue. 2. Modify the source of jsonmarshaller to not call Class.forName() at all (can you just get the class by getting the class of the member itself, not using the name?) 3. Modify the source to use the current thread's context class loader (I actually hacked the source and got this to work, but it was a hack). You could use some of the ideas in (1) 4. Modify the source to try to get the class by using the current Class.forName() and if that fails (throws ClassNotFoundException), then try Class.forName(name, true, loader) where loader is obtained by Thread().currentThread().getContextClassLoader() before giving up. This might be the easiest/best way to deal with this issue. Of course, applications like the sample one would have to set the current thread's ContextClassLoader, but at least it would work. Remember there are 2 places where Class.forName() is called and both need to be looked at. I hope this helps. Feel free to contact me if you have questions/issues/... Jim Stabile
  • Aug 20, 2009
    issue 24 (Deploy to Maven repository) reported by yura.taras   -   Please, deploy your lib to some of the public maven repos
    Please, deploy your lib to some of the public maven repos
  • Aug 15, 2009
    json-0.19.jar (json-0.19.jar) file uploaded by pascallouisperez   -  
    Labels: Featured
    Labels: Featured
  • Aug 15, 2009
    r107 (Up to version 0.19.) committed by pascallouisperez   -   Up to version 0.19.
    Up to version 0.19.
  • Aug 15, 2009
    r106 (Optimizing unmarshalling by avoiding any boxing of literal t...) committed by pascallouisperez   -   Optimizing unmarshalling by avoiding any boxing of literal types. The serialization now has specific implementations for byte, char, short, int, long, float and double when they appear in fields or in arrays.
    Optimizing unmarshalling by avoiding any boxing of literal types. The serialization now has specific implementations for byte, char, short, int, long, float and double when they appear in fields or in arrays.
  • Aug 14, 2009
    r105 (Optimizing serialization by avoiding any boxing of literal t...) committed by pascallouisperez   -   Optimizing serialization by avoiding any boxing of literal types. The serialization now has specific implementations for byte, char, short, int, long, float and double when they appear in fields or in arrays.
    Optimizing serialization by avoiding any boxing of literal types. The serialization now has specific implementations for byte, char, short, int, long, float and double when they appear in fields or in arrays.
  • Aug 14, 2009
    r104 (Buildfix: format is now more precise since numbers are not a...) committed by pascallouisperez   -   Buildfix: format is now more precise since numbers are not always converted to BigDecimal values.
    Buildfix: format is now more precise since numbers are not always converted to BigDecimal values.
  • Aug 14, 2009
    r103 (Adding specific Json.Number implementations for all literals...) committed by pascallouisperez   -   Adding specific Json.Number implementations for all literals to improve the efficiency of the marshaller. These will be integrated in the marshalling flow to avoid boxing literals to their java.lang.Number respective classes, and then converting that to a BigDecimal.
    Adding specific Json.Number implementations for all literals to improve the efficiency of the marshaller. These will be integrated in the marshalling flow to avoid boxing literals to their java.lang.Number respective classes, and then converting that to a BigDecimal.
  • Aug 12, 2009
    r102 (Avoiding run-time creation of Json.String values by creatign...) committed by pascallouisperez   -   Avoiding run-time creation of Json.String values by creatign them before hand. This will improve performance a hair.
    Avoiding run-time creation of Json.String values by creatign them before hand. This will improve performance a hair.
  • Aug 10, 2009
    r101 (Implementing the @Value(optional = true) feature by using Fi...) committed by pascallouisperez   -   Implementing the @Value(optional = true) feature by using FieldDescriptor combinations rather than specific handling in the various FieldDescriptor implementations. Introducing the OptionalFieldDescriptor whose marshalling and unmarshalling code implement the conditional marshalling based on null checks.
    Implementing the @Value(optional = true) feature by using FieldDescriptor combinations rather than specific handling in the various FieldDescriptor implementations. Introducing the OptionalFieldDescriptor whose marshalling and unmarshalling code implement the conditional marshalling based on null checks.
  • Aug 09, 2009
    r100 (Testing the optional feature with a dedicated test. This fea...) committed by pascallouisperez   -   Testing the optional feature with a dedicated test. This feature descriptions is now clearer.
    Testing the optional feature with a dedicated test. This feature descriptions is now clearer.
  • Aug 09, 2009
    r99 (Optimizing how string are printed to a writer. The append me...) committed by pascallouisperez   -   Optimizing how string are printed to a writer. The append method wraps each character into a char[] and calls the overloaded method. This can be avoided by using a StringBuilder, building the string, and copying in one go into the writer. The increase in performance is about 2.5x on the benchmark attached.
    Optimizing how string are printed to a writer. The append method wraps each character into a char[] and calls the overloaded method. This can be avoided by using a StringBuilder, building the string, and copying in one go into the writer. The increase in performance is about 2.5x on the benchmark attached.
  • Aug 06, 2009
    issue 23 (Classes not mentionned in the sublcasses list should not nee...) reported by pascallouisperez   -   Supposing the hierarchy @Entity(subclasses = Leaf) class Top {} @Entity class Middle extends Top {} @Entity class Leaf extends Middle {} the JsonMarshaller should not fail if Middle has no no-arg constructor.
    Supposing the hierarchy @Entity(subclasses = Leaf) class Top {} @Entity class Middle extends Top {} @Entity class Leaf extends Middle {} the JsonMarshaller should not fail if Middle has no no-arg constructor.
  • Jul 28, 2009
    r98 (Patch from Hylke van der Schaaf (the_noid@dds.nl).) committed by pascallouisperez   -   Patch from Hylke van der Schaaf (the_noid@dds.nl).
    Patch from Hylke van der Schaaf (the_noid@dds.nl).
  • Jul 08, 2009
    Introduction (quick introduction to the library) Wiki page commented on by sergio.rolanski   -   By using generics this project is not compatible with j2me?
    By using generics this project is not compatible with j2me?
  • Jun 07, 2009
    issue 22 (byte (and Byte) are not valid for @Entity) Status changed by pascallouisperez   -   This has been added to the library http://code.google.com/p/jsonmarshaller/source/detail?r=97
    Status: Fixed
    This has been added to the library http://code.google.com/p/jsonmarshaller/source/detail?r=97
    Status: Fixed
  • Jun 07, 2009
    r97 (Adding support for bytes.) committed by pascallouisperez   -   Adding support for bytes.
    Adding support for bytes.
  • Jun 05, 2009
    issue 22 (byte (and Byte) are not valid for @Entity) commented on by jjstabile   -   Hi, You'll have to excuse the ignorance--I'm just now coming up to speed on JSON. I assume that serialization isn't an issue. On deserialization, if the value is out of range of a byte, then throw an exception? What am I missing? Thanks....Nice toolkit BTW!
    Hi, You'll have to excuse the ignorance--I'm just now coming up to speed on JSON. I assume that serialization isn't an issue. On deserialization, if the value is out of range of a byte, then throw an exception? What am I missing? Thanks....Nice toolkit BTW!
  • Jun 04, 2009
    issue 22 (byte (and Byte) are not valid for @Entity) commented on by pascallouisperez   -   Good point, we do not handle bytes for the moment. Do you have a proposal to represent this in JSON?
    Good point, we do not handle bytes for the moment. Do you have a proposal to represent this in JSON?
  • Jun 04, 2009
    issue 22 (byte (and Byte) are not valid for @Entity) reported by jjstabile   -   Using the @Entity tag with byte or Byte does not work. Changing to short, int, or long works fine. Code: Light.java ------------ import com.twolattes.json.*; @Entity public class Light { @Value(name="ballastTemp") private byte mBallastTemp; public Light() { } } Marsh.java ---------- import com.twolattes.json.*; public class Marsh { public static void main(String[] args) throws Exception { Marshaller<Light> m Marshaller<Light>)TwoLattes.createMarshaller(Light.class); Light light= new Light(); Json.Object o = m.marshall(light); System.out.println(o.toString()); } } Output: -------- Exception in thread "main" java.lang.NullPointerException at com.twolattes.json.AbstractFieldDescriptor.marshall(AbstractFieldDescriptor.java:46) at com.twolattes.json.ConcreteEntityDescriptor.marshallFields(ConcreteEntityDescriptor.java:137) at com.twolattes.json.ConcreteEntityDescriptor.marshall(ConcreteEntityDescriptor.java:127) at com.twolattes.json.ConcreteEntityDescriptor.marshall(ConcreteEntityDescriptor.java:18) at com.twolattes.json.MarshallerImpl.marshall(MarshallerImpl.java:38) at com.twolattes.json.MarshallerImpl.marshall(MarshallerImpl.java:34) at Marsh.main(Marsh.java:26)
    Using the @Entity tag with byte or Byte does not work. Changing to short, int, or long works fine. Code: Light.java ------------ import com.twolattes.json.*; @Entity public class Light { @Value(name="ballastTemp") private byte mBallastTemp; public Light() { } } Marsh.java ---------- import com.twolattes.json.*; public class Marsh { public static void main(String[] args) throws Exception { Marshaller<Light> m Marshaller<Light>)TwoLattes.createMarshaller(Light.class); Light light= new Light(); Json.Object o = m.marshall(light); System.out.println(o.toString()); } } Output: -------- Exception in thread "main" java.lang.NullPointerException at com.twolattes.json.AbstractFieldDescriptor.marshall(AbstractFieldDescriptor.java:46) at com.twolattes.json.ConcreteEntityDescriptor.marshallFields(ConcreteEntityDescriptor.java:137) at com.twolattes.json.ConcreteEntityDescriptor.marshall(ConcreteEntityDescriptor.java:127) at com.twolattes.json.ConcreteEntityDescriptor.marshall(ConcreteEntityDescriptor.java:18) at com.twolattes.json.MarshallerImpl.marshall(MarshallerImpl.java:38) at com.twolattes.json.MarshallerImpl.marshall(MarshallerImpl.java:34) at Marsh.main(Marsh.java:26)
  • May 27, 2009
    r96 (Un-exposing factory methods for boolean and null JSON values...) committed by jaredjacobs   -   Un-exposing factory methods for boolean and null JSON values. Instead, pointing to the public constants.
    Un-exposing factory methods for boolean and null JSON values. Instead, pointing to the public constants.
  • May 27, 2009
    r95 (Exposing factory methods for boolean and null JSON values.) committed by jaredjacobs   -   Exposing factory methods for boolean and null JSON values.
    Exposing factory methods for boolean and null JSON values.
  • Apr 27, 2009
    r94 (Eliminating decimals from string representations of whole nu...) committed by jaredjacobs   -   Eliminating decimals from string representations of whole number types.
    Eliminating decimals from string representations of whole number types.
  • Apr 27, 2009
    r93 (Removing unused class.) committed by jaredjacobs   -   Removing unused class.
    Removing unused class.
  • Apr 23, 2009
    r92 (Implementing Pascal's comments on r88.) committed by julien.wetterwald   -   Implementing Pascal's comments on r88.
    Implementing Pascal's comments on r88.
  • Apr 22, 2009
    r91 (Cosmetic changes only -- primarily just moving to static imp...) committed by jaredjacobs   -   Cosmetic changes only -- primarily just moving to static imports of factory methods.
    Cosmetic changes only -- primarily just moving to static imports of factory methods.
  • Apr 21, 2009
    r90 ("18a" is an alpha release of version 18.) committed by jaredjacobs   -   "18a" is an alpha release of version 18.
    "18a" is an alpha release of version 18.
  • Apr 21, 2009
    r89 (Adding a Json.Object factory method that takes an arbitrary ...) committed by jaredjacobs   -   Adding a Json.Object factory method that takes an arbitrary number of key-value pairs.
    Adding a Json.Object factory method that takes an arbitrary number of key-value pairs.
 
Hosted by Google Code