Add JSON encode, decode support; Add independent internal API support