     value = case f do
       %Field{multiple: true} -> []
       %Field{default: nil} -> nil
+      %Field{default: "true"} when type == :boolean -> true
+      %Field{default: "false"} when type == :boolean -> false
       %Field{default: d} ->
         if type in [:integer, :non_neg_integer, :pos_integer] do
           {num, <<>>} = Integer.parse(d, 10)

    type_list = fs
    |> Enum.map(fn f -> {f.name, f.type} end)
    |> Enum.map(fn {n, t} -> quote do unquote(n) :: unquote(t) end end)
    mod_name = Atom.to_string(parent_mod) <>
      "." <> (t.name |> String.capitalize)
    |> String.to_atom
    quote do
      defmodule unquote(mod_name) do
        defstruct unquote(field_list)

    |> Enum.reject(fn entry -> entry == [] end)
    |> Enum.map(fn {name, type} ->
      t = Macro.escape(type)
      s = struct_name(type.name, __CALLER__.module)
      struct = Macro.escape(s)
      quote do
        AmqpOne.TypeManager.add_type(unquote(name), unquote(t))
        AmqpOne.TypeManager.add_type(unquote(t))
        AmqpOne.TypeManager.add_type(unquote(struct), unquote(t))
      end
    end)
  end
