* New Features *
+ - #2159, report libjson version from postgis_full_version()
- #2770, ST_MemSize(raster)
- Add postgis_noop(raster)
- Added missing variants of ST_TPI(), ST_TRI() and ST_Roughness()
#include "liblwgeom.h"
#include "lwgeom_export.h"
+#ifdef HAVE_LIBJSON
+# ifdef HAVE_LIBJSON_C
+# include <json-c/json.h>
+# else
+# include <json/json.h>
+# endif
+#endif
+
Datum geom_from_geojson(PG_FUNCTION_ARGS);
Datum postgis_libjson_version(PG_FUNCTION_ARGS);
#ifndef HAVE_LIBJSON
PG_RETURN_NULL();
#else /* HAVE_LIBJSON */
+# ifdef JSON_C_VERSION
+ const char *ver = json_c_version();
+# else
const char *ver = "UNKNOWN";
+# endif
text *result = cstring2text(ver);
PG_RETURN_POINTER(result);
#endif