PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ findMemberByName()

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

Definition at line 65 of file lwin_geojson.c.

66 {
67  json_object* poTmp;
68  json_object_iter it;
69 
70  poTmp = poObj;
71 
72  if( NULL == pszName || NULL == poObj)
73  return NULL;
74 
75  it.key = NULL;
76  it.val = NULL;
77  it.entry = NULL;
78 
79  if( NULL != json_object_get_object(poTmp) )
80  {
81  if( NULL == json_object_get_object(poTmp)->head )
82  {
83  geojson_lwerror("invalid GeoJSON representation", 2);
84  return NULL;
85  }
86 
87  for( it.entry = json_object_get_object(poTmp)->head;
88  ( it.entry ?
89  ( it.key = (char*)it.entry->k,
90  it.val = (json_object*)it.entry->v, it.entry) : 0);
91  it.entry = it.entry->next)
92  {
93  if( strcasecmp((char *)it.key, pszName )==0 )
94  return it.val;
95  }
96  }
97 
98  return NULL;
99 }
static void geojson_lwerror(char *msg, __attribute__((__unused__)) int error_code)
Definition: lwin_geojson.c:55

References geojson_lwerror().

Referenced by lwgeom_from_geojson(), parse_geojson(), parse_geojson_geometrycollection(), parse_geojson_linestring(), parse_geojson_multilinestring(), parse_geojson_multipoint(), parse_geojson_multipolygon(), parse_geojson_point(), and parse_geojson_polygon().

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