lib/rusty_json/rust_struct.rb
def add_value(name, type, subtype = nil)
      if type.class == RustyJson::RustStruct || subtype.class == RustyJson::RustStruct
        if type.class == RustyJson::RustStruct
          t = type
          type = type.name
          struct = t
        elsif subtype.class == RustyJson::RustStruct
          s = subtype
          subtype = subtype.name
          struct = s
        end
        @structs << struct
        RustStruct.add_type(struct.name, struct.name)
      end
      @values[name] = [type, subtype]
      true
    end
def add_value(name, type, subtype = nil)
      if type.class == RustyJson::RustStruct || subtype.class == RustyJson::RustStruct
        if type.class == RustyJson::RustStruct
          t = type
          type = type.name
          struct = t
        elsif subtype.class == RustyJson::RustStruct
          s = subtype
          subtype = subtype.name
          struct = s
        end
        @structs << struct
        RustStruct.add_type(struct.name, struct.name)
      end
      @values[name] = [type, subtype]
      true
    end
Add Value is how we add keys to the resulting Struct
 We need a name and a type, and potentially a subtype

 For example:
 types could be String, Fixnum, or Array
 If the tyoe is Array, then we need the subtype of the array,
 is it an array of integers or strings?

 @param name [String] what is this key in the struct
 @param type [Class] What typs are we
 @param subtype [Class] What typs are we

 @return true