start to add json schema functions
now can provide json schema (not fully tested)