1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-24 09:17:17 +00:00

Fix makefile and add json doc.

This commit is contained in:
Calvin Rose 2018-11-15 17:44:30 -05:00
parent 4d119e4e03
commit aa8384488c
2 changed files with 11 additions and 3 deletions

View File

@ -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:

View File

@ -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}
};