Work on JSON generation. isEmpty needs work.