GEOS-6530: moved JSON encoding into PPIO class