   @doc """
   Drop spaces encountered after end of key (while waiting for colon) in object key context.
   """
-  def parse(<<?", 32, t::binary>>, c = [:string, :key, :pair, :object | context], output) do
+  def parse(<<?", s, t::binary>>, c = [:string, :key, :pair, :object | context], output) when s in @whitespace do
     debug "Dropping space after end of string key in object context", t, context, output
     parse(<<?">> <> t, c, output)
   end

    test "overly closed array" do
      assert {:error, _} = JSON.parse("[[[[]]]]]")
    end

  end
end

  @doc """
  Drop number context if no more digits.
  """
  def parse(<<n, t::binary>>, [:number | context], output) when not n in @digits do
    debug "Dropping number context", t, context, output
    parse(<<n>> <> t, context, output)
  end
