add Objec#to_jksn
preliminary implementation of encoder