move JSON API stuff to a discussion