add json api support on framework level

Signed-off-by: TomWu <phperwuhan@gmail.com>
a bit modify for json

Signed-off-by: TomWu <phperwuhan@gmail.com>