[JOHNZON-331] handle toJson(object,type) properly for list case
2 files changed