public static object parse(string jsonInput) { try { return(LPFJsonMapper.ToObjectSimple(jsonInput)); } catch (JsonException inner_exception) { throw new JsonParseException("Internal JSON parse error:", inner_exception); } }
protected IDictionary <string, object> LoadFromFile(string filePath, ConfigurationFileInfo configFileInfo) { IDictionary <string, object> result = null; string text = null; if (configFileInfo.IsResourceFile) { TextAsset textAsset = Resources.Load(filePath, typeof(TextAsset)) as TextAsset; if (textAsset != null) { text = textAsset.text; } } if (text == null) { text = File.ReadAllText(filePath); } string text2 = null; if (configFileInfo.IsEncrypted) { try { text2 = AesCipher.Decrypt(text, configFileInfo.EncryptionKey); } catch (Exception) { } } if (text2 == null) { text2 = text; } if (text2 != null) { result = LPFJsonMapper.ToObjectSimple(text2) as IDictionary <string, object>; } return(result); }
public static void LoadSettings() { string buildSettingsJson = EnvironmentManager.GetBuildSettingsJson(); m_keyValueStore = (string.IsNullOrEmpty(buildSettingsJson) ? new Dictionary <string, object>() : (LPFJsonMapper.ToObjectSimple(buildSettingsJson) as IDictionary <string, object>)); }