public void SerializeJson(StringBuilder sb) { sb.Append(NirvanaJsonObject.OpenBrace); var jsonObject = new NirvanaJsonObject(sb); jsonObject.AddStringValue("Id", Id); jsonObject.AddStringValues("Consequences", Consequences); sb.Append(NirvanaJsonObject.CloseBrace); }
public string SerializeJson() { var sb = new StringBuilder(); var jsonObject = new NirvanaJsonObject(sb); sb.Append(NirvanaJsonObject.OpenBrace); jsonObject.AddStringValue("Chromosome", Chromosome); jsonObject.AddIntValue("Position", Position); jsonObject.AddStringValue("RefAllele", RefAllele); jsonObject.AddStringValue("AltAllele", AltAllele); jsonObject.AddObjectValues("Transcripts", Transcripts); jsonObject.AddDoubleValue("AlleleFrequency", AlleleFrequency, "0.######"); jsonObject.AddStringValue("Pathogenicity", Pathogenicity); jsonObject.AddIntValues("PubmedIds", PubmedIds); sb.Append(NirvanaJsonObject.CloseBrace); return(sb.ToString()); }