pascallouisperez / jsonmarshaller

JsonMarshaller is a Java 1.5 library that allows marshalling and unmarshalling of JSON objects to and from entities ("Java classes").
Apache License 2.0
1 stars 0 forks source link

Need ability to mark entities as "value objects" so you don't get "cyclicity detected" exception when marshalling with cyclic set to false #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a simple value object class (for instance Money with field
"amount" inside it), with equals implemented as value equals
2. Put 2 instances of your object with same values inside object graph/tree
3. marshall the object graph

What is the expected output? What do you see instead?

You get java.lang.IllegalArgumentException: cyclicity detected

Would like the ability to mark an entity as "valueObject" or something like
that so value equal instances can bypass the cyclicity check.

What version of the product are you using? On what operating system?

Using version 0.10

Please provide any additional information below.

I already implemented this by adding a "valueObject" property on the Entity
annotation and checking this for bypass in the ConcreteEntityDescriptor.
I'm not sure if this would need to be checked in other descriptors. Code
for Entity and ConcreteEntityDescriptor attached.

Original issue reported on code.google.com by graemeir...@gmail.com on 11 Mar 2008 at 10:14

Attachments:

GoogleCodeExporter commented 9 years ago
Cyclic marshalling has been removed from the library. I'm closing this bug 
which is 
not relevant anymore.

Original comment by pascallo...@gmail.com on 18 Dec 2008 at 5:40