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.