add register api and fixing JsonHandler lib