use JSON for data switching