/** * Decodes a JSON string to a map (string name -> object) * * @param in - JSON string * @return map representing the string */ public static Map<String, Object> decodeToMap(String in) { //noinspection unchecked return (Map<String, Object>) JSONDecoder.decode(in); }
@SuppressWarnings("unchecked") public static Message createCommandMessage(QueueSession session, String json) { if (json.length() == 0) return null; Message msg = createWithPartsFromRawMap(ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(json), new DecodingSession(MappingContextSingleton.get()))) .setResource("Session", session) .setResource("SessionID", session.getSessionId()); msg.setFlag(RoutingFlag.FromRemote); return msg; }
/** * Decodes a JSON string to a map (string name -> object) * * @param in - JSON string * @return map representing the string */ public static Map<String, Object> decodeToMap(String in) { //noinspection unchecked return (Map<String, Object>) JSONDecoder.decode(in); }
@Override public EJValue parse(final String input) { return JSONDecoder.decode(input); } });
@Override public EJValue parse(final String input) { return JSONDecoder.decode(input); } });
@SuppressWarnings("unchecked") final EJValue val = JSONDecoder.decode(((TextWebSocketFrame) frame).text());
public static ProxyConfig parse(String json) { ProxyConfig config = new ProxyConfig((Map<String, Object>) JSONDecoder.decode(json)); return config; }
public static ProxyConfig parse(String json) { ProxyConfig config = new ProxyConfig((Map<String, Object>) JSONDecoder.decode(json)); return config; }
public static Message uglyReEncode(String message) { if (message == null) return null; Map<String, Object> parts = ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(message), new DecodingSession(MappingContextSingleton.get())); return CommandMessage.createWithParts(parts); }
public static Message uglyReEncode(String message) { if (message == null) return null; Map<String, Object> parts = ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(message), new DecodingSession(MappingContextSingleton.get())); return CommandMessage.createWithParts(parts); }
public static Message decodeAndDemarshall(String json) { Map<String, Object> parts = ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(json), new DecodingSession(MappingContextSingleton.get())); if (parts == null) return CommandMessage.create(); return CommandMessage.createWithParts(parts); } }
public static Message decodeAndDemarshall(String json) { Map<String, Object> parts = ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(json), new DecodingSession(MappingContextSingleton.get())); if (parts == null) return CommandMessage.create(); return CommandMessage.createWithParts(parts); } }
@SuppressWarnings("unchecked") public static Message createCommandMessage(QueueSession session, String json) { if (json.length() == 0) return null; Message msg = createWithPartsFromRawMap(ErraiProtocolEnvelopeMarshaller.INSTANCE.demarshall(JSONDecoder.decode(json), new DecodingSession(MappingContextSingleton.get()))) .setResource("Session", session) .setResource("SessionID", session.getSessionId()); msg.setFlag(RoutingFlag.FromRemote); return msg; }
public void doErraiMessage(final String message) { final EJValue val = JSONDecoder.decode(message);
public void doErraiMessage(final String message) { final EJValue val = JSONDecoder.decode(message);
final EJValue val = JSONDecoder.decode(((TextFrame) frame).getText());
@SuppressWarnings("unchecked") final EJValue val = JSONDecoder.decode(((TextWebSocketFrame) frame).text());