diff --git a/Makefile b/Makefile index 5a6de677..525d6696 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,7 @@ CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -fvisibility=hidden \ CLIBS=-lm -ldl JANET_TARGET=janet JANET_LIBRARY=libjanet.so +JANET_PATH?=/usr/local/lib/janet DEBUGGER=gdb UNAME:=$(shell uname -s) @@ -180,7 +181,8 @@ install: $(JANET_TARGET) $(LDCONFIG) install-libs: natives - cp lib/* $(JANET_PATH) + mkdir -p $(JANET_PATH) + cp -r lib $(JANET_PATH) cp natives/*/*.so $(JANET_PATH) uninstall: diff --git a/natives/json/json.c b/natives/json/json.c index 3d2d972b..b4fcfabf 100644 --- a/natives/json/json.c +++ b/natives/json/json.c @@ -588,8 +588,14 @@ static int json_encode(JanetArgs args) { /****************/ static const JanetReg cfuns[] = { - {"encode", json_encode}, - {"decode", json_decode}, + {"encode", json_encode, + "(json.encode x)\n\n" + "Encodes a janet value in JSON (utf-8)." + }, + {"decode", json_decode, + "(json.decode json-source)\n\n" + "Returns a janet object after parsing JSON." + }, {NULL, NULL} };