Updated to use the dart:convert library instead of the deprecated dart:json one.