summaryrefslogtreecommitdiffstats
path: root/tests/json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:40:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:40:05 +0000
commit4038ab95a094b363f1748f3dcb51511a1217475d (patch)
tree7f393d66a783f91ddd263c78d681e485cf4f45ca /tests/json
parentInitial commit. (diff)
downloadraptor2-4038ab95a094b363f1748f3dcb51511a1217475d.tar.xz
raptor2-4038ab95a094b363f1748f3dcb51511a1217475d.zip
Adding upstream version 2.0.16.upstream/2.0.16upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/json')
-rw-r--r--tests/json/CMakeLists.txt69
-rw-r--r--tests/json/Makefile.am130
-rw-r--r--tests/json/Makefile.in613
-rw-r--r--tests/json/bad-00.json3
-rw-r--r--tests/json/bad-01.json10
-rw-r--r--tests/json/bad-02.json11
-rw-r--r--tests/json/bad-03.json10
-rw-r--r--tests/json/bad-04.json7
-rw-r--r--tests/json/bad-05.json11
-rw-r--r--tests/json/bad-06.json12
-rw-r--r--tests/json/bad-07.json11
-rw-r--r--tests/json/bad-08.json11
-rw-r--r--tests/json/bad-09.json11
-rw-r--r--tests/json/bad-10.json11
-rw-r--r--tests/json/bad-11.json11
-rw-r--r--tests/json/bad-12.json7
-rw-r--r--tests/json/bad-13.json11
-rw-r--r--tests/json/example1.json22
-rw-r--r--tests/json/example1.nt13
-rw-r--r--tests/json/example2.json57
-rw-r--r--tests/json/example2.nt13
-rw-r--r--tests/json/example3.json14
-rw-r--r--tests/json/example3.nt1
-rw-r--r--tests/json/example4.json39
-rw-r--r--tests/json/example4.nt5
25 files changed, 1113 insertions, 0 deletions
diff --git a/tests/json/CMakeLists.txt b/tests/json/CMakeLists.txt
new file mode 100644
index 0000000..249ace7
--- /dev/null
+++ b/tests/json/CMakeLists.txt
@@ -0,0 +1,69 @@
+# raptor/tests/json/CMakeLists.txt
+#
+# Original listfile by Daniel Richard G. <skunk@iSKUNK.ORG>
+# This file is in the public domain.
+#
+
+IF(RAPTOR_PARSER_JSON)
+
+ RAPPER_TEST(json.example1
+ "${RAPPER} -q -i json -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/example1.json http://example.librdf.org/example1.json"
+ example1.res
+ ${CMAKE_CURRENT_SOURCE_DIR}/example1.nt
+ )
+
+ RAPPER_TEST(json.example2
+ "${RAPPER} -q -i json -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/example2.json http://example.librdf.org/example2.json"
+ example2.res
+ ${CMAKE_CURRENT_SOURCE_DIR}/example2.nt
+ )
+
+ RAPPER_TEST(json.example3
+ "${RAPPER} -q -i json -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/example3.json http://example.librdf.org/example3.json"
+ example3.res
+ ${CMAKE_CURRENT_SOURCE_DIR}/example3.nt
+ )
+
+ RAPPER_TEST(json.example4
+ "${RAPPER} -q -i json -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/example4.json http://example.librdf.org/example4.json"
+ example4.res
+ ${CMAKE_CURRENT_SOURCE_DIR}/example4.nt
+ )
+
+ ADD_TEST(json.bad-00 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-00.json http://example.librdf.org/bad-00.json) # WILL_FAIL
+ ADD_TEST(json.bad-01 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-01.json http://example.librdf.org/bad-01.json) # WILL_FAIL
+ ADD_TEST(json.bad-02 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-02.json http://example.librdf.org/bad-02.json) # WILL_FAIL
+ ADD_TEST(json.bad-03 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-03.json http://example.librdf.org/bad-03.json) # WILL_FAIL
+ ADD_TEST(json.bad-04 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-04.json http://example.librdf.org/bad-04.json) # WILL_FAIL
+ ADD_TEST(json.bad-05 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-05.json http://example.librdf.org/bad-05.json) # WILL_FAIL
+ ADD_TEST(json.bad-06 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-06.json http://example.librdf.org/bad-06.json) # WILL_FAIL
+ ADD_TEST(json.bad-07 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-07.json http://example.librdf.org/bad-07.json) # WILL_FAIL
+ ADD_TEST(json.bad-08 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-08.json http://example.librdf.org/bad-08.json) # WILL_FAIL
+ ADD_TEST(json.bad-09 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-09.json http://example.librdf.org/bad-09.json) # WILL_FAIL
+ ADD_TEST(json.bad-10 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-10.json http://example.librdf.org/bad-10.json) # WILL_FAIL
+ ADD_TEST(json.bad-11 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-11.json http://example.librdf.org/bad-11.json) # WILL_FAIL
+ ADD_TEST(json.bad-12 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-12.json http://example.librdf.org/bad-12.json) # WILL_FAIL
+ ADD_TEST(json.bad-13 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-13.json http://example.librdf.org/bad-13.json) # WILL_FAIL
+
+ SET_TESTS_PROPERTIES(
+ json.bad-00
+ json.bad-01
+ json.bad-02
+ json.bad-03
+ json.bad-04
+ json.bad-05
+ json.bad-06
+ json.bad-07
+ json.bad-08
+ json.bad-09
+ json.bad-10
+ json.bad-11
+ json.bad-12
+ json.bad-13
+ PROPERTIES
+ WILL_FAIL TRUE
+ )
+
+ENDIF(RAPTOR_PARSER_JSON)
+
+# end raptor/tests/json/CMakeLists.txt
diff --git a/tests/json/Makefile.am b/tests/json/Makefile.am
new file mode 100644
index 0000000..ec59cb8
--- /dev/null
+++ b/tests/json/Makefile.am
@@ -0,0 +1,130 @@
+# -*- Mode: Makefile -*-
+#
+# Makefile.am - automake file for Raptor JSON tests
+#
+# Copyright (C) 2010, David Beckett http://purl.org/net/dajobe/
+#
+# This package is Free Software and part of Redland http://librdf.org/
+#
+# It is licensed under the following three licenses as alternatives:
+# 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version
+# 2. GNU General Public License (GPL) V2 or any newer version
+# 3. Apache License, V2.0 or any newer version
+#
+# You may not use this file except in compliance with at least one of
+# the above three licenses.
+#
+# See LICENSE.html or LICENSE.txt at the top of this package for the
+# complete terms and further detail along with the license texts for
+# the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively.
+#
+#
+
+TEST_FILES=\
+example1.json example2.json example3.json example4.json
+
+TEST_OUT_FILES=\
+example1.nt example2.nt example3.nt example4.nt
+
+JSON_BAD_TEST_FILES=bad-00.json bad-01.json bad-02.json bad-03.json \
+bad-04.json bad-05.json bad-06.json bad-07.json bad-08.json bad-09.json \
+bad-10.json bad-11.json bad-12.json bad-13.json
+
+# Used to make N-triples output consistent
+BASE_URI=http://example.librdf.org/
+
+EXTRA_DIST = \
+ CMakeLists.txt \
+ $(TEST_FILES) \
+ $(TEST_OUT_FILES) \
+ $(JSON_BAD_TEST_FILES)
+
+RAPPER = $(top_builddir)/utils/rapper
+
+CLEANFILES = CMakeTests.txt CMakeTmp.txt
+
+build-rapper:
+ @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT))
+
+if RAPTOR_PARSER_JSON
+check-local: build-rapper check-json check-bad-json
+else
+check-local:
+endif
+
+if MAINTAINER_MODE
+check_json_deps = $(TEST_FILES)
+endif
+
+check-json: build-rapper $(check_json_deps)
+ @result=0; \
+ $(RECHO) "Testing legal JSON"; \
+ printf 'IF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \
+ for test in $(TEST_FILES); do \
+ name=`basename $$test .json` ; \
+ baseuri=$(BASE_URI)$$test; \
+ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \
+ $(RAPPER) -q -i json -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \
+ status=$$?; \
+ if test $$status != 0 -a $$status != 2 ; then \
+ $(RECHO) FAILED returned status $$status; result=1; \
+ elif cmp $(srcdir)/$$name.nt $$name.res >/dev/null 2>&1; then \
+ if test $$status = 2 ; then \
+ $(RECHO) "ok with warnings"; grep Warning $$name.err; \
+ else \
+ $(RECHO) "ok"; \
+ fi; \
+ else \
+ $(RECHO) "FAILED"; \
+ cat $$name.err; \
+ diff $(srcdir)/$$name.nt $$name.res; result=1; \
+ fi; \
+ rm -f $$name.res $$name.err; \
+ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \
+ json.$$name \
+ "\$${RAPPER} -q -i json -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \
+ $$name.res \
+ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.nt" >>CMakeTests.txt; \
+ done; \
+ printf 'ENDIF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \
+ exit $$result
+
+if MAINTAINER_MODE
+check_bad_json_deps = $(JSON_BAD_TEST_FILES)
+endif
+
+check-bad-json: build-rapper $(check_bad_json_deps)
+ @set +e; result=0; \
+ $(RECHO) "Testing that bad JSON fails"; \
+ printf 'IF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \
+ for test in $(JSON_BAD_TEST_FILES); do \
+ name=`basename $$test .json` ; \
+ baseuri=$(BASE_URI)$$name.json; \
+ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \
+ $(RAPPER) -q -i json -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \
+ status=$$?; \
+ if test $$status -eq 1 ; then \
+ $(RECHO) "ok"; \
+ elif test $$status -eq 2 ; then \
+ $(RECHO) "FAILED - parsing succeeded with a warning"; \
+ cat $$name.res; grep Warning $$name.err; result=1; \
+ elif test $$status -eq 0 ; then \
+ $(RECHO) "FAILED - parsing succeeded but should have failed"; \
+ cat $$name.res; result=1; \
+ else \
+ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \
+ cat $$name.res; result=1; \
+ fi; \
+ rm -f $$name.res $$name.err ; \
+ printf '\tADD_TEST(%s %s) # WILL_FAIL\n' \
+ json.$$name \
+ "\$${RAPPER} -q -i json -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" >>CMakeTests.txt; \
+ printf '\t\t%s\n' json.$$name >>CMakeTmp.txt; \
+ done; \
+ (printf '\n\tSET_TESTS_PROPERTIES(\n'; \
+ cat CMakeTmp.txt; \
+ printf '\t\tPROPERTIES\n\t\tWILL_FAIL TRUE\n\t)\n\n'; \
+ printf 'ENDIF(RAPTOR_PARSER_JSON)\n\n') >>CMakeTests.txt; \
+ rm -f CMakeTmp.txt; \
+ set -e; exit $$result
+
diff --git a/tests/json/Makefile.in b/tests/json/Makefile.in
new file mode 100644
index 0000000..d5c04b7
--- /dev/null
+++ b/tests/json/Makefile.in
@@ -0,0 +1,613 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# -*- Mode: Makefile -*-
+#
+# Makefile.am - automake file for Raptor JSON tests
+#
+# Copyright (C) 2010, David Beckett http://purl.org/net/dajobe/
+#
+# This package is Free Software and part of Redland http://librdf.org/
+#
+# It is licensed under the following three licenses as alternatives:
+# 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version
+# 2. GNU General Public License (GPL) V2 or any newer version
+# 3. Apache License, V2.0 or any newer version
+#
+# You may not use this file except in compliance with at least one of
+# the above three licenses.
+#
+# See LICENSE.html or LICENSE.txt at the top of this package for the
+# complete terms and further detail along with the license texts for
+# the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively.
+#
+#
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tests/json
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \
+ $(top_srcdir)/build/libtool.m4 \
+ $(top_srcdir)/build/ltoptions.m4 \
+ $(top_srcdir)/build/ltsugar.m4 \
+ $(top_srcdir)/build/ltversion.m4 \
+ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/raptor_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BISON = @BISON@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CURL_CONFIG = @CURL_CONFIG@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FILECMD = @FILECMD@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HTML_DIR = @HTML_DIR@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JING = @JING@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBCURL_CFLAGS = @LIBCURL_CFLAGS@
+LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MEM = @MEM@
+MEM_LIBS = @MEM_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@
+RANLIB = @RANLIB@
+RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@
+RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@
+RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@
+RAPTOR_PARSERS = @RAPTOR_PARSERS@
+RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@
+RAPTOR_VERSION = @RAPTOR_VERSION@
+RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@
+RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@
+RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@
+RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@
+RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@
+RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@
+RECHO = @RECHO@
+RECHO_C = @RECHO_C@
+RECHO_N = @RECHO_N@
+RPM_RELEASE = @RPM_RELEASE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TAR = @TAR@
+VERSION = @VERSION@
+XML_CONFIG = @XML_CONFIG@
+XSLT_CFLAGS = @XSLT_CFLAGS@
+XSLT_CONFIG = @XSLT_CONFIG@
+XSLT_LIBS = @XSLT_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+TEST_FILES = \
+example1.json example2.json example3.json example4.json
+
+TEST_OUT_FILES = \
+example1.nt example2.nt example3.nt example4.nt
+
+JSON_BAD_TEST_FILES = bad-00.json bad-01.json bad-02.json bad-03.json \
+bad-04.json bad-05.json bad-06.json bad-07.json bad-08.json bad-09.json \
+bad-10.json bad-11.json bad-12.json bad-13.json
+
+
+# Used to make N-triples output consistent
+BASE_URI = http://example.librdf.org/
+EXTRA_DIST = \
+ CMakeLists.txt \
+ $(TEST_FILES) \
+ $(TEST_OUT_FILES) \
+ $(JSON_BAD_TEST_FILES)
+
+RAPPER = $(top_builddir)/utils/rapper
+CLEANFILES = CMakeTests.txt CMakeTmp.txt
+@MAINTAINER_MODE_TRUE@check_json_deps = $(TEST_FILES)
+@MAINTAINER_MODE_TRUE@check_bad_json_deps = $(JSON_BAD_TEST_FILES)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/json/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/json/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am check check-am check-local clean clean-generic \
+ clean-libtool cscopelist-am ctags-am distclean \
+ distclean-generic distclean-libtool distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am
+
+.PRECIOUS: Makefile
+
+
+build-rapper:
+ @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT))
+
+@RAPTOR_PARSER_JSON_TRUE@check-local: build-rapper check-json check-bad-json
+@RAPTOR_PARSER_JSON_FALSE@check-local:
+
+check-json: build-rapper $(check_json_deps)
+ @result=0; \
+ $(RECHO) "Testing legal JSON"; \
+ printf 'IF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \
+ for test in $(TEST_FILES); do \
+ name=`basename $$test .json` ; \
+ baseuri=$(BASE_URI)$$test; \
+ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \
+ $(RAPPER) -q -i json -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \
+ status=$$?; \
+ if test $$status != 0 -a $$status != 2 ; then \
+ $(RECHO) FAILED returned status $$status; result=1; \
+ elif cmp $(srcdir)/$$name.nt $$name.res >/dev/null 2>&1; then \
+ if test $$status = 2 ; then \
+ $(RECHO) "ok with warnings"; grep Warning $$name.err; \
+ else \
+ $(RECHO) "ok"; \
+ fi; \
+ else \
+ $(RECHO) "FAILED"; \
+ cat $$name.err; \
+ diff $(srcdir)/$$name.nt $$name.res; result=1; \
+ fi; \
+ rm -f $$name.res $$name.err; \
+ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \
+ json.$$name \
+ "\$${RAPPER} -q -i json -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \
+ $$name.res \
+ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.nt" >>CMakeTests.txt; \
+ done; \
+ printf 'ENDIF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \
+ exit $$result
+
+check-bad-json: build-rapper $(check_bad_json_deps)
+ @set +e; result=0; \
+ $(RECHO) "Testing that bad JSON fails"; \
+ printf 'IF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \
+ for test in $(JSON_BAD_TEST_FILES); do \
+ name=`basename $$test .json` ; \
+ baseuri=$(BASE_URI)$$name.json; \
+ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \
+ $(RAPPER) -q -i json -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \
+ status=$$?; \
+ if test $$status -eq 1 ; then \
+ $(RECHO) "ok"; \
+ elif test $$status -eq 2 ; then \
+ $(RECHO) "FAILED - parsing succeeded with a warning"; \
+ cat $$name.res; grep Warning $$name.err; result=1; \
+ elif test $$status -eq 0 ; then \
+ $(RECHO) "FAILED - parsing succeeded but should have failed"; \
+ cat $$name.res; result=1; \
+ else \
+ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \
+ cat $$name.res; result=1; \
+ fi; \
+ rm -f $$name.res $$name.err ; \
+ printf '\tADD_TEST(%s %s) # WILL_FAIL\n' \
+ json.$$name \
+ "\$${RAPPER} -q -i json -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" >>CMakeTests.txt; \
+ printf '\t\t%s\n' json.$$name >>CMakeTmp.txt; \
+ done; \
+ (printf '\n\tSET_TESTS_PROPERTIES(\n'; \
+ cat CMakeTmp.txt; \
+ printf '\t\tPROPERTIES\n\t\tWILL_FAIL TRUE\n\t)\n\n'; \
+ printf 'ENDIF(RAPTOR_PARSER_JSON)\n\n') >>CMakeTests.txt; \
+ rm -f CMakeTmp.txt; \
+ set -e; exit $$result
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/json/bad-00.json b/tests/json/bad-00.json
new file mode 100644
index 0000000..ba9fba4
--- /dev/null
+++ b/tests/json/bad-00.json
@@ -0,0 +1,3 @@
+/* bad-00.json - Nearly empty document */
+
+{
diff --git a/tests/json/bad-01.json b/tests/json/bad-01.json
new file mode 100644
index 0000000..83d2614
--- /dev/null
+++ b/tests/json/bad-01.json
@@ -0,0 +1,10 @@
+/* bad-01.json - Missing trailing curly-brace */
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ "object" : { "type" : "literal", "value" : "Anna Wilder" }
+ }
+ ]
diff --git a/tests/json/bad-02.json b/tests/json/bad-02.json
new file mode 100644
index 0000000..8188c24
--- /dev/null
+++ b/tests/json/bad-02.json
@@ -0,0 +1,11 @@
+// bad-02.json - Missing the value for a literal
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ "object" : { "type" : "literal" }
+ }
+ ]
+} \ No newline at end of file
diff --git a/tests/json/bad-03.json b/tests/json/bad-03.json
new file mode 100644
index 0000000..913d9e8
--- /dev/null
+++ b/tests/json/bad-03.json
@@ -0,0 +1,10 @@
+/* bad-03.json - No object defined for triple */
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }
+ }
+ ]
+}
diff --git a/tests/json/bad-04.json b/tests/json/bad-04.json
new file mode 100644
index 0000000..6746c18
--- /dev/null
+++ b/tests/json/bad-04.json
@@ -0,0 +1,7 @@
+/* bad-04.json - Resource-centric JSON missing an object */
+
+{
+ "http://example.org/about" : {
+ "http://purl.org/dc/elements/1.1/creator" : [ {} ]
+ }
+}
diff --git a/tests/json/bad-05.json b/tests/json/bad-05.json
new file mode 100644
index 0000000..0343e08
--- /dev/null
+++ b/tests/json/bad-05.json
@@ -0,0 +1,11 @@
+/* bad-05.json - Invalid attribute */
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ "object" : { "type" : "literal", "value" : "Anna Wilder", "foo" : "bar" }
+ }
+ ]
+} \ No newline at end of file
diff --git a/tests/json/bad-06.json b/tests/json/bad-06.json
new file mode 100644
index 0000000..b2c3ca2
--- /dev/null
+++ b/tests/json/bad-06.json
@@ -0,0 +1,12 @@
+/* bad-06.json - Invalid term name */
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ "object" : { "type" : "literal", "value" : "Anna Wilder" },
+ "foo" : { "type" : "literal", "value" : "Anna Wilder" }
+ }
+ ]
+}
diff --git a/tests/json/bad-07.json b/tests/json/bad-07.json
new file mode 100644
index 0000000..408fdc4
--- /dev/null
+++ b/tests/json/bad-07.json
@@ -0,0 +1,11 @@
+/* bad-07.json - Document with a null value */
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ "object" : { "type" : "literal", "value" : null }
+ }
+ ]
+}
diff --git a/tests/json/bad-08.json b/tests/json/bad-08.json
new file mode 100644
index 0000000..02dcf7c
--- /dev/null
+++ b/tests/json/bad-08.json
@@ -0,0 +1,11 @@
+/* bad-08.json - Document with a boolean value */
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ "object" : { "type" : "literal", "value" : true }
+ }
+ ]
+}
diff --git a/tests/json/bad-09.json b/tests/json/bad-09.json
new file mode 100644
index 0000000..d442522
--- /dev/null
+++ b/tests/json/bad-09.json
@@ -0,0 +1,11 @@
+/* bad-07.json - Document with a integer value */
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ "object" : { "type" : "literal", "value" : 44 }
+ }
+ ]
+}
diff --git a/tests/json/bad-10.json b/tests/json/bad-10.json
new file mode 100644
index 0000000..9eb69f4
--- /dev/null
+++ b/tests/json/bad-10.json
@@ -0,0 +1,11 @@
+/* bad-11.json - Document with a float value */
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ "object" : { "type" : "literal", "value" : 4.4 }
+ }
+ ]
+}
diff --git a/tests/json/bad-11.json b/tests/json/bad-11.json
new file mode 100644
index 0000000..12a9f36
--- /dev/null
+++ b/tests/json/bad-11.json
@@ -0,0 +1,11 @@
+/* bad-11.json - Syntax error in the JSON - extra square-brace */
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" ]},
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ "object" : { "type" : "literal", "value" : "Anna Wilder" }
+ }
+ ]
+}
diff --git a/tests/json/bad-12.json b/tests/json/bad-12.json
new file mode 100644
index 0000000..d44ed04
--- /dev/null
+++ b/tests/json/bad-12.json
@@ -0,0 +1,7 @@
+/* bad-12.json - Not RDF/JSON */
+
+{
+ "key1" : "value1",
+ "key2" : "value2",
+ "key3" : "value3"
+}
diff --git a/tests/json/bad-13.json b/tests/json/bad-13.json
new file mode 100644
index 0000000..0763679
--- /dev/null
+++ b/tests/json/bad-13.json
@@ -0,0 +1,11 @@
+/* bad-06.json - Missing term type */
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ "object" : { "value" : "Anna Wilder" },
+ }
+ ]
+}
diff --git a/tests/json/example1.json b/tests/json/example1.json
new file mode 100644
index 0000000..23d7b42
--- /dev/null
+++ b/tests/json/example1.json
@@ -0,0 +1,22 @@
+{
+ "http://example.org/about" : {
+ "http://purl.org/dc/elements/1.1/creator" : [ { "value" : "Anna Wilder", "type" : "literal" } ],
+ "http://purl.org/dc/elements/1.1/title" : [ { "value" : "Anna's Homepage", "type" : "literal", "lang" : "en" } ] ,
+ "http://xmlns.com/foaf/0.1/maker" : [ { "value" : "_:person", "type" : "bnode" } ]
+ } ,
+
+ "_:person" : {
+ "http://xmlns.com/foaf/0.1/homepage" : [ { "value" : "http://example.org/about", "type" : "uri" } ] ,
+ "http://xmlns.com/foaf/0.1/made" : [ { "value" : "http://example.org/about", "type" : "uri" } ] ,
+ "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Anna Wilder", "type" : "literal" } ] ,
+ "http://xmlns.com/foaf/0.1/firstName" : [ { "value" : "Anna", "type" : "literal" } ] ,
+ "http://xmlns.com/foaf/0.1/surname" : [ { "value" : "Wilder", "type" : "literal" } ] ,
+ "http://xmlns.com/foaf/0.1/depiction" : [ { "value" : "http://example.org/pic.jpg", "type" : "uri" } ] ,
+ "http://xmlns.com/foaf/0.1/nick" : [
+ { "type" : "literal", "value" : "wildling"} ,
+ { "type" : "literal", "value" : "wilda" }
+ ] ,
+ "http://xmlns.com/foaf/0.1/age" : [ { "value" : "48", "type" : "literal", "datatype" : "http://www.w3.org/2001/XMLSchema#integer" } ] ,
+ "http://xmlns.com/foaf/0.1/mbox_sha1sum" : [ { "value" : "69e31bbcf58d432950127593e292a55975bc66fd", "type" : "literal" } ]
+ }
+}
diff --git a/tests/json/example1.nt b/tests/json/example1.nt
new file mode 100644
index 0000000..ba74572
--- /dev/null
+++ b/tests/json/example1.nt
@@ -0,0 +1,13 @@
+<http://example.org/about> <http://purl.org/dc/elements/1.1/creator> "Anna Wilder" .
+<http://example.org/about> <http://purl.org/dc/elements/1.1/title> "Anna's Homepage"@en .
+<http://example.org/about> <http://xmlns.com/foaf/0.1/maker> _:person .
+_:person <http://xmlns.com/foaf/0.1/homepage> <http://example.org/about> .
+_:person <http://xmlns.com/foaf/0.1/made> <http://example.org/about> .
+_:person <http://xmlns.com/foaf/0.1/name> "Anna Wilder" .
+_:person <http://xmlns.com/foaf/0.1/firstName> "Anna" .
+_:person <http://xmlns.com/foaf/0.1/surname> "Wilder" .
+_:person <http://xmlns.com/foaf/0.1/depiction> <http://example.org/pic.jpg> .
+_:person <http://xmlns.com/foaf/0.1/nick> "wildling" .
+_:person <http://xmlns.com/foaf/0.1/nick> "wilda" .
+_:person <http://xmlns.com/foaf/0.1/age> "48"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:person <http://xmlns.com/foaf/0.1/mbox_sha1sum> "69e31bbcf58d432950127593e292a55975bc66fd" .
diff --git a/tests/json/example2.json b/tests/json/example2.json
new file mode 100644
index 0000000..adf3a6f
--- /dev/null
+++ b/tests/json/example2.json
@@ -0,0 +1,57 @@
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ "object" : { "type" : "literal", "value" : "Anna Wilder" }
+ },{
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/title" },
+ "object" : { "type" : "literal", "value" : "Anna's Homepage", "lang" : "en" }
+ },{
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/maker" },
+ "object" : { "type" : "bnode", "value" : "_:person" }
+ },{
+ "subject" : { "type" : "bnode", "value" : "_:person" },
+ "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/homepage" },
+ "object" : { "type" : "uri", "value" : "http://example.org/about" }
+ },{
+ "subject" : { "type" : "bnode", "value" : "_:person" },
+ "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/made" },
+ "object" : { "type" : "uri", "value" : "http://example.org/about" }
+ },{
+ "subject" : { "type" : "bnode", "value" : "_:person" },
+ "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/name" },
+ "object" : { "type" : "literal", "value" : "Anna Wilder" }
+ },{
+ "subject" : { "type" : "bnode", "value" : "_:person" },
+ "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/firstName" },
+ "object" : { "type" : "literal", "value" : "Anna" }
+ },{
+ "subject" : { "type" : "bnode", "value" : "_:person" },
+ "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/surname" },
+ "object" : { "type" : "literal", "value" : "Wilder" }
+ },{
+ "subject" : { "type" : "bnode", "value" : "_:person" },
+ "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/depiction" },
+ "object" : { "type" : "uri", "value" : "http://example.org/pic.jpg" }
+ },{
+ "subject" : { "type" : "bnode", "value" : "_:person" },
+ "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/nick" },
+ "object" : { "type" : "literal", "value" : "wildling" }
+ },{
+ "subject" : { "type" : "bnode", "value" : "_:person" },
+ "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/nick" },
+ "object" : { "type" : "literal", "value" : "wilda" }
+ },{
+ "subject" : { "type" : "bnode", "value" : "_:person" },
+ "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/age" },
+ "object" : { "type" : "literal", "value" : "48", "datatype" : "http://www.w3.org/2001/XMLSchema#integer" }
+ },{
+ "subject" : { "type" : "bnode", "value" : "_:person" },
+ "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/mbox_sha1sum" },
+ "object" : { "type" : "literal", "value" : "69e31bbcf58d432950127593e292a55975bc66fd" }
+ }
+ ]
+}
diff --git a/tests/json/example2.nt b/tests/json/example2.nt
new file mode 100644
index 0000000..ba74572
--- /dev/null
+++ b/tests/json/example2.nt
@@ -0,0 +1,13 @@
+<http://example.org/about> <http://purl.org/dc/elements/1.1/creator> "Anna Wilder" .
+<http://example.org/about> <http://purl.org/dc/elements/1.1/title> "Anna's Homepage"@en .
+<http://example.org/about> <http://xmlns.com/foaf/0.1/maker> _:person .
+_:person <http://xmlns.com/foaf/0.1/homepage> <http://example.org/about> .
+_:person <http://xmlns.com/foaf/0.1/made> <http://example.org/about> .
+_:person <http://xmlns.com/foaf/0.1/name> "Anna Wilder" .
+_:person <http://xmlns.com/foaf/0.1/firstName> "Anna" .
+_:person <http://xmlns.com/foaf/0.1/surname> "Wilder" .
+_:person <http://xmlns.com/foaf/0.1/depiction> <http://example.org/pic.jpg> .
+_:person <http://xmlns.com/foaf/0.1/nick> "wildling" .
+_:person <http://xmlns.com/foaf/0.1/nick> "wilda" .
+_:person <http://xmlns.com/foaf/0.1/age> "48"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:person <http://xmlns.com/foaf/0.1/mbox_sha1sum> "69e31bbcf58d432950127593e292a55975bc66fd" .
diff --git a/tests/json/example3.json b/tests/json/example3.json
new file mode 100644
index 0000000..ba8e095
--- /dev/null
+++ b/tests/json/example3.json
@@ -0,0 +1,14 @@
+/* example3.json - a comment at the start of the file */
+
+// C++ style comment
+
+{
+ "triples" : [
+ {
+ "subject" : { "type" : "uri", "value" : "http://example.org/about" },
+ "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" },
+ // Comment in the middle
+ "object" : { "type" : "literal", "value" : "Anna Wilder" }
+ }
+ ]
+}
diff --git a/tests/json/example3.nt b/tests/json/example3.nt
new file mode 100644
index 0000000..4606943
--- /dev/null
+++ b/tests/json/example3.nt
@@ -0,0 +1 @@
+<http://example.org/about> <http://purl.org/dc/elements/1.1/creator> "Anna Wilder" .
diff --git a/tests/json/example4.json b/tests/json/example4.json
new file mode 100644
index 0000000..5603272
--- /dev/null
+++ b/tests/json/example4.json
@@ -0,0 +1,39 @@
+{
+ "http://example.com/joe/foaf.rdf" : {
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ {
+ "value" : "http://xmlns.com/foaf/0.1/PersonalProfileDocument",
+ "type" : "uri"
+ }
+
+ ],
+ "http://xmlns.com/foaf/0.1/primaryTopic" : [ {
+ "value" : "http://www.example.com/joe#me",
+ "type" : "uri"
+ }
+
+ ]
+ }
+ ,
+ "http://www.example.com/joe#me" : {
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ {
+ "value" : "http://xmlns.com/foaf/0.1/Person",
+ "type" : "uri"
+ }
+
+ ],
+ "http://xmlns.com/foaf/0.1/name" : [ {
+ "value" : "Joe Bloggs",
+ "lang" : "en",
+ "type" : "literal"
+ }
+
+ ],
+ "http://xmlns.com/foaf/0.1/age" : [ {
+ "value" : "59",
+ "datatype" : "http://www.w3.org/2001/XMLSchema#integer",
+ "type" : "literal"
+ }
+
+ ]
+ }
+}
diff --git a/tests/json/example4.nt b/tests/json/example4.nt
new file mode 100644
index 0000000..ab1bee9
--- /dev/null
+++ b/tests/json/example4.nt
@@ -0,0 +1,5 @@
+<http://example.com/joe/foaf.rdf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/PersonalProfileDocument> .
+<http://example.com/joe/foaf.rdf> <http://xmlns.com/foaf/0.1/primaryTopic> <http://www.example.com/joe#me> .
+<http://www.example.com/joe#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://www.example.com/joe#me> <http://xmlns.com/foaf/0.1/name> "Joe Bloggs"@en .
+<http://www.example.com/joe#me> <http://xmlns.com/foaf/0.1/age> "59"^^<http://www.w3.org/2001/XMLSchema#integer> .