Migrate JSON encoding/decoding to dart:convert