moved trivialjson to a separate file