You are not converting a VarRef to Json, you are converting a Variable to Json.