PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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 void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.

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: