public IModelObject GetJsonObject() { return(new SectionObject() { language = "fi", body = text, links = linkDict.GetJsonObject() }); }
public IModelObject GetJsonObject() { // TODO: implement 'language' here. return(new ExampleObject() { text = text, links = linkDict.GetJsonObject(), language = "fi" }); }
public IModelObject GetJsonObject() { var exObjs = examples.Select(e => new ExampleObject[1] { (ExampleObject)e.GetJsonObject() }); return(new DefinitionObject() { text = text, language = "fi", rank = rank, links = linkDict.GetJsonObject(), examples = exObjs }); }
/* * public string category; * public IEnumerable<DefinitionObject> definitions; * public string inflectionType; * public IEnumerable<InflectionObject> inflections; * public IEnumerable<SectionObject> sections; * public IEnumerable<LinkObject> links; * public SectionObject info; */ public IModelObject GetJsonObject() { var catObj = category; var defObj = definitions.Select(d => (DefinitionObject)d.GetJsonObject()); var infectionTypeObj = info; var declens = declensionTable.SelectMany(t => t.declensions).Select(m => (InflectionObject)m.GetJsonObject()); var conjs = conjugations.SelectMany(morphArray => morphArray.Select(a => (InflectionObject)a.GetJsonObject())); var inflections = declens.Concat(conjs); var sectionObjs = sections.Select(s => (SectionObject)s.GetJsonObject()); return(new EntryObject() { category = category, definitions = defObj, inflectionType = info, inflections = inflections, sections = sectionObjs, links = linkDict.GetJsonObject() }); }