Simple JSON api

A few things that I still want to add, but its functioning.