The json api part is just about finished