public override Data read(JsonObject obj) { Facet facet = new Facet(); try { facet.Key = obj.GetNamedString("key"); facet.DisplayName = obj.GetNamedString("displayName"); facet.Count = (uint)obj.GetNamedNumber("count"); } catch (Exception e) { //TODO: log exception System.Diagnostics.Debug.WriteLine(e.Message); } return facet; }
public override Data read(JsonObject obj) { FacetGroup facetGroup = new FacetGroup(); Facet facet = new Facet(); try { facetGroup.GroupName = obj.GetNamedString("filter"); JsonArray root = obj.GetNamedArray(arrayName); facet.readList<Facet>(root, facetGroup.Items); } catch (Exception e) { //TODO: log exception System.Diagnostics.Debug.WriteLine(e.Message); } return facetGroup; }