lib/json2/csv_with_header.rb
def process_keys(object)
      if object.respond_to?(:each_key)
        object.each_key do |key|
          @names_stack.push(key)
          process_key(object[key])
          @names_stack.pop
        end
      else
        error(98, 'Error, try with json2 --without-header')
      end
    end
# Creates a new CsvWithHeader instance.
#
# input   - A Hash representing a Json file. This is typically
#           obtained with JSON.parse.
# options - Optional. A Hash of options, see Option to get the list.
Creates a new CsvWithHeader instance.
input   - A Hash representing a Json file. This is typically
obtained with JSON.parse.
options - Optional. A Hash of options, see Option to get the list.
Creates a new CsvWithHeader instance . input - A Hash representing a Json file . This is typically obtained with JSON . parse . options - Optional . A Hash of options see Option to get the list .
def process_keys(object)
      if object.respond_to?(:each_key)
        object.each_key do |key|
          @names_stack.push(key)
          process_key(object[key])
          @names_stack.pop
        end
      else
        error(98, 'Error, try with json2 --without-header')
      end
    end
def process_keys ( object ) if object . respond_to? ( :each_key ) object . each_key do | key | @names_stack . push ( key ) process_key ( object [ key ] ) @names_stack . pop end else error ( 98 , 'Error, try with json2 --without-header' ) end end
Creates a new CsvWithHeader instance.
Creates a new CsvWithHeader instance .
object