More debugging for json encoding