json parsing code complete (for now)