HTTPSession.register(TransportRegistry.i());
}
Client client = new Client(TransportRegistry.i().createSession(jsonUrl));
Field serializerField = client.getClass().getDeclaredField("serializer");
serializerField.setAccessible(true);
JSONSerializer serializer = (JSONSerializer) serializerField.get(client);
serializer.registerSerializer(new JSONEnterpriseObjectSerializer());
serializer.registerSerializer(new NSArraySerializer());
serializer.registerSerializer(new NSDictionarySerializer());
serializer.registerSerializer(new NSTimestampSerializer());
serializer.registerSerializer(new NSDataSerializer());
serializer.registerSerializer(new ERXConstantSerializer());
return client;
}