faster implementation of JSONable support