begin faster json encoding
Fixes from other projects