public Dictionary <string, object> GetDictionary(string aKey) { Dictionary <string, object> lResult = null; try { lResult = JSONTokenProcessor.JSonObjectToDictionary((JsonObject)Get(aKey)); } catch (Exception lEx) { throw new Exception(WebSocketMessage.NO_PARSED_VALUE + lEx.Message); } return(lResult); }
public IToken GetToken(string aKey) { IToken lResult = null; try { lResult = JSONTokenProcessor.JsonStringToToken(Get(aKey).ToString()); } catch (Exception lEx) { throw new Exception(WebSocketMessage.NO_PARSED_VALUE + lEx.Message); } return(lResult); }
public List <object> GetList(string aKey) { List <object> lResult = null; try { lResult = JSONTokenProcessor.JSonArrayToList(JSONTokenProcessor.JsonStringToJsonArray(Get(aKey).ToString())); } catch (Exception lEx) { throw new Exception(WebSocketMessage.NO_PARSED_VALUE + lEx.Message); } return(lResult); }
public static IWebSocketPacket TokenToPacket(string aFormat, IToken aToken) { if (aFormat.Equals(WebSocketConstants.WS_FORMAT_JSON)) { return(JSONTokenProcessor.TokenToPacket(aToken)); } else if (aFormat.Equals(WebSocketConstants.WS_SUBPROT_CSV)) { throw new NotImplementedException(WebSocketMessage.NOT_IMPLEMENTED_YET); } else if (aFormat.Equals(WebSocketConstants.WS_FORMAT_XML)) { throw new NotImplementedException(WebSocketMessage.NOT_IMPLEMENTED_YET); } return(null); }
public IWebSocketPacket TokenToPacket(IToken aToken) { if (mNegotiatedSubProtocol.SubProtocol.Equals(WebSocketConstants.WS_SUBPROT_JSON)) { return(JSONTokenProcessor.TokenToPacket(aToken)); } else if (mNegotiatedSubProtocol.Equals(WebSocketConstants.WS_SUBPROT_CSV)) { throw new NotImplementedException(WebSocketMessage.NOT_IMPLEMENTED_YET); } else if (mNegotiatedSubProtocol.Equals(WebSocketConstants.WS_FORMAT_XML)) { throw new NotImplementedException(WebSocketMessage.NOT_IMPLEMENTED_YET); } return(null); }
private IToken PacketToToken(IWebSocketPacket aDataPacket) { return(JSONTokenProcessor.PacketToToken(aDataPacket)); }