Fixed handling of StaticPages when generating JSON