PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ findMemberByName()

static json_object* findMemberByName ( json_object *  poObj,
const char *  pszName 
)
inlinestatic

Definition at line 52 of file lwin_geojson.c.

53 {
54  json_object *poTmp;
55  json_object_iter it;
56 
57  poTmp = poObj;
58 
59  if (!pszName || !poObj)
60  return NULL;
61 
62  it.key = NULL;
63  it.val = NULL;
64  it.entry = NULL;
65 
66  if (json_object_get_object(poTmp))
67  {
68  if (!json_object_get_object(poTmp)->head)
69  {
70  lwerror("invalid GeoJSON representation");
71  return NULL;
72  }
73 
74  for (it.entry = json_object_get_object(poTmp)->head;
75  (it.entry ? (it.key = (char *)it.entry->k, it.val = (json_object *)it.entry->v, it.entry) : 0);
76  it.entry = it.entry->next)
77  {
78  if (strcasecmp((char *)it.key, pszName) == 0)
79  return it.val;
80  }
81  }
82 
83  return NULL;
84 }
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190

References lwerror().

Referenced by lwgeom_from_geojson(), parse_coordinates(), parse_geojson(), and parse_geojson_geometrycollection().

Here is the call graph for this function:
Here is the caller graph for this function: