简体   繁体   中英

Java equivalent to Doug Crockford's cycle.js

I'm using JSON as my serialization technology between JavaScript and Java. I have an object graph that I want to serialize (not and object tree) and I want to maintain object references when it is serialized/deserialized.

Douglas Crockford's cycle.js seems like a good solution for this. https://github.com/douglascrockford/JSON-js

But there is no equivalent library on the Java side that I can find. I'm currently using Gson and would like to use an adapter but so far I can't find one.

One the Java side there is the Jackson ObjectIdentity feature. http://wiki.fasterxml.com/JacksonFeatureObjectIdentity

I could switch from Gson to Jackson; but I can't find an equivalent JavaScript library.

Does anyone know of a Java library that is equivalent to Douglas Crockford's cylce.js? Or a JavaScript library that is equivalent to Jackson ObjectIdentity?

我最终使用了支持Java jackson序列化的JSOG ,并且对我来说效果很好。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM