Added json api with examples