Fix JSON bug in Gii

Should be put under the 2.0.0 release section. Also please add the issue number. Thanks.