/// <summary> /// Responsible for deserializing the JSON that was built. /// Will ensure that the JSON is well-formed /// </summary> public static Dictionary <string, JsonElement> SerializeOutputJSON(InputOutputPairing pairing) { var resultJSON = pairing.FormattedOutput; var resultDic = JsonSerializer.Deserialize <Dictionary <string, JsonElement> >(resultJSON); return(resultDic); }
public void Emit(LogEvent logEvent) { var ioPairing = new InputOutputPairing(logEvent); InputsAndOutputs.Add(ioPairing); using (var writer = new StringWriter()) { _formatter.Format(logEvent, writer); ioPairing.FormattedOutput = writer.ToString(); } }
/// <summary> /// Responsible for deserializing the JSON that was built. /// Will ensure that the JSON is well-formed /// </summary> public static Dictionary <string, JsonElement> DeserializeOutputJSON(InputOutputPairing pairing) { var resultJSON = pairing.FormattedOutput; return(TestHelpers.DeserializeOutputJSON(resultJSON)); }