Improved json encoding
Improved json encoding