public virtual void endObject(XJson doc, string k) { if (fkey == k) { doc.setListener(fparent); close(); } }
public override void beginObject(XJson doc, string k) { if (k == "data") fData.__open(fjson,k); }
public virtual void beginObject(XJson doc, string k) { }
public override void beginObject(XJson doc, string k) { switch(k) { case "attributes": if (!fIsRelations) doc.startDumpBlock(); break; case "geometry": fIsGeometry = true; break; case "featureAssociations": fIsRelations = true; break; } }
public override void endObject(XJson doc, string k) { if (k == "attributes") { if (!fIsRelations) { fe.attrs = doc.stopDumpBlock(); #if (test_enabled) bool rc = new XJson().ParseFromString(fe.attrs); if (!rc) { doc.__message(fe.Name(), "attributes parse error"); doc.__message(null, fe.attrs); } #endif } } else if (k == "geometry") { if (fgeometry.Enabled) fe.geometry(fgeometry); } else if (k == "featureAssociations") { if (frelation.Enabled) fe.relation(frelation); } else base.endObject(doc, k); }
public void __open(XJson doc, string key) { doc.setListener(this); fkey = key; reset(key); }
public override void beginObject(XJson doc, string k) { frings = false; if (k != null) frings = (k == "rings"); }
public override void endObject(XJson doc, string k) { if (k == "internalPoints") c.internalPoint(flat, flon); else base.endObject(doc, k); }
public override void beginObject(XJson doc, string k) { finternalPoints = false; if (k != null) finternalPoints = (k == "internalPoints"); }
public override void beginObject(XJson doc, string k) { string id = null; tsObjectRef tag = tsConvert.StrToRef(k,ref id); switch (tag) { case tsObjectRef.refPoint: fPoint.__open(doc,k); break; case tsObjectRef.refPolyline: fPolyline.__open(doc, k); break; case tsObjectRef.refPolygon: fPolygon.__open(doc, k); break; case tsObjectRef.refFeature: fFeature.__open(doc, k); break; } }
public bool ParseStream(StreamReader stream, tmessage message) { fjson = new XJson(); fjson.message = message; fjson.setListener(this); bool rc = true; if (fdoc != null) { tsContentBound bound = new tsContentBound(); jsonData temp = fData; fData = new jsonData(this, bound); fjson.setListener(this); fjson.Parse(stream); fData = temp; if (bound.count > 0) rc = fdoc.Bound(bound.minLat, bound.minLon, bound.maxLat, bound.maxLon); } if (rc) if (fdoc == null) rc=ParseStage(stream,0); else for(int i=0; i < fdoc.GetStageCount(); i++ ) rc=ParseStage(stream,i); if (rc) fData.log(message); fjson.Close(); return rc; }