add doc and fix json problem