Added json api

Resolves #6 
nevermind, I see it