Add function parsejson, acceptance test
RvalDestroy must destroy container rvals.

default switch case considered harmful.