@@ -281,15 +281,15 @@ Type.fromJSON = function fromJSON(name, json) {
281281 */
282282Type . prototype . toJSON = function toJSON ( ) {
283283 var inherited = Namespace . prototype . toJSON . call ( this ) ;
284- return {
285- options : inherited && inherited . options || undefined ,
286- oneofs : Namespace . arrayToJSON ( this . oneofsArray ) ,
287- fields : Namespace . arrayToJSON ( this . fieldsArray . filter ( function ( obj ) { return ! obj . declaringField ; } ) ) || { } ,
288- extensions : this . extensions && this . extensions . length ? this . extensions : undefined ,
289- reserved : this . reserved && this . reserved . length ? this . reserved : undefined ,
290- group : this . group || undefined ,
291- nested : inherited && inherited . nested || undefined
292- } ;
284+ return util . toObject ( [
285+ " options" , inherited && inherited . options || undefined ,
286+ " oneofs" , Namespace . arrayToJSON ( this . oneofsArray ) ,
287+ " fields" , Namespace . arrayToJSON ( this . fieldsArray . filter ( function ( obj ) { return ! obj . declaringField ; } ) ) || { } ,
288+ " extensions" , this . extensions && this . extensions . length ? this . extensions : undefined ,
289+ " reserved" , this . reserved && this . reserved . length ? this . reserved : undefined ,
290+ " group" , this . group || undefined ,
291+ " nested" , inherited && inherited . nested || undefined
292+ ] ) ;
293293} ;
294294
295295/**
0 commit comments