correction of postnextJSON method optimized for server