reorder the json interface so that loc and kw (those with special indexing) are last