class Thrift::JSONListContext

Context class for lists

Public Class Methods

new() click to toggle source
    # File lib/thrift/protocol/json_protocol.rb
116 def initialize
117   @first = true
118 end

Public Instance Methods

read(reader) click to toggle source
    # File lib/thrift/protocol/json_protocol.rb
128 def read(reader)
129   if (@first)
130     @first = false
131   else
132     JsonProtocol::read_syntax_char(reader, @@kJSONElemSeparator)
133   end
134 end
write(trans) click to toggle source
    # File lib/thrift/protocol/json_protocol.rb
120 def write(trans)
121   if (@first)
122     @first = false
123   else
124     trans.write(@@kJSONElemSeparator)
125   end
126 end