public JSONSerializer(SupportedJsonParserTypes parserType) { // The West Wind Parser is native if (parserType == SupportedJsonParserTypes.WestWindJsonSerializer) { _serializer = new WestwindJsonSerializer(this); } #if (true) //JSONNET_REFERENCE) else if (parserType == SupportedJsonParserTypes.JsonNet) { _serializer = new JsonNetJsonSerializer(this); } //_serializer = new JsonNetJsonSerializerOld(this); #endif else if (parserType == SupportedJsonParserTypes.JavaScriptSerializer) { _serializer = new WebExtensionsJavaScriptSerializer(this); } else { throw new InvalidOperationException(Resources.UnsupportedJSONSerializerSpecified); } }
public JsonSerializer(SupportedJsonParserTypes parserType) { this.FormatJsonOutput = false; // The West Wind Parser is native if (parserType == SupportedJsonParserTypes.WestWindJsonSerializer) { this.serializer = new WestwindJsonSerializer(this); } #if (true) //JSONNET_REFERENCE) //else if (parserType == SupportedJsonParserTypes.JsonNet) // _serializer = new JsonNetJsonSerializer(this); #endif //else if (parserType == SupportedJsonParserTypes.JavaScriptSerializer) // _serializer = new WebExtensionsJavaScriptSerializer(this); else { throw new InvalidOperationException("Unsuported serializer"); } }
public JSONSerializer(SupportedJsonParserTypes parserType) { // The West Wind Parser is native if (parserType == SupportedJsonParserTypes.CustomJsonSerializer) { _serializer = new CustomJsonSerializer(this); } #if (true) //JSONNET_REFERENCE) else if (parserType == SupportedJsonParserTypes.JsonNet) { _serializer = new JsonNetJsonSerializer(this); } #endif else if (parserType == SupportedJsonParserTypes.JavaScriptSerializer) { _serializer = new WebExtensionsJavaScriptSerializer(this); } else { throw new InvalidOperationException(); } }