Added Persistor, Json write to stream

Fixed JsonObject to byte conversions to be compliant