Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Using org.eclipse.jetty.util.ajax.JSON in custom WebSocketListener

Hi,

On Tue, Jun 7, 2016 at 12:25 PM, Alexander Farber
<alexander.farber@xxxxxxxxx> wrote:
> Could you please add few words about using
> the org.eclipse.jetty.util.ajax.JSON class?
>
> In cometd source code I do not see any calls to JSON.parse(str);

This is how CometD uses the JSON class to parse and generate:
https://github.com/cometd/cometd/blob/master/cometd-java/cometd-java-common/src/main/java/org/cometd/common/JettyJSONContext.java

For usages with custom classes, converted to/from JSON, see for example:
https://github.com/sbordet/oort-chat-demo/blob/master/src/main/java/org/cometd/demo/JSONContextServer.java

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top