move json-lib to core