MGM: json pretty to json encode.