Convert array to JSON when processing SQL values.