File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ module.exports = Field;
44Field . className = "Field" ;
55
66var ReflectionObject = require ( "./object" ) ;
7+ var Message = require ( "./message" ) ;
78/** @alias Field.prototype */
89var FieldPrototype = ReflectionObject . extend ( Field ) ;
910
@@ -254,7 +255,7 @@ FieldPrototype.resolve = function resolve() {
254255
255256 if ( this . long )
256257 this . defaultValue = util . Long . fromValue ( this . defaultValue ) ;
257-
258+
258259 return ReflectionObject . prototype . resolve . call ( this ) ;
259260} ;
260261
@@ -279,6 +280,8 @@ FieldPrototype.jsonConvert = function(value, options) {
279280 return options . bytes === Array
280281 ? Array . prototype . slice . call ( value )
281282 : util . base64 . encode ( value , 0 , value . length ) ;
283+ else if ( value instanceof Message )
284+ return value . asJSON ( options ) ;
282285 }
283286 return value ;
284287} ;
You can’t perform that action at this time.
0 commit comments