public override string Encode(string input, VM vm) { object obj = JsonConvert.DeserializeObject(input); obj = JsonToWatson(obj); return(WatsonGen.Generate(obj, vm)); }
public override void Encode(StreamReader reader, StreamWriter writer, VM vm) { var deserializer = new DeserializerBuilder().Build(); object obj = deserializer.Deserialize <object>(reader); obj = YamlToWatson(obj); WatsonGen.Generate(writer, obj, vm); }
public override string Encode(string input, VM vm) { var deserializer = new DeserializerBuilder().Build(); object obj = deserializer.Deserialize <object>(input); obj = YamlToWatson(obj); return(WatsonGen.Generate(obj, vm)); }
public override void Encode(StreamReader reader, StreamWriter writer, VM vm) { var serializer = JsonSerializer.CreateDefault(); object obj = serializer.Deserialize(reader, typeof(object)); obj = JsonToWatson(obj); WatsonGen.Generate(writer, obj, vm); }