     test "overly closed array" do
       assert {:error, _} = JSON.parse("[[[[]]]]]")
     end
+    test "object with no value" do
+      assert {:error, _} = JSON.parse("{\"a\": }")
+    end
+    test "object with no key" do
+      assert {:error, _} = JSON.parse("{\"a\"}")
+      assert {:error, _} = JSON.parse("{5}")
+    end
+    test "object with wrong key type" do
+      assert {:error, _} = JSON.parse("{65: 23}")
+    end
+    test "object with wrong string key delimiter" do
+      assert {:error, _} = JSON.parse("{'65': 23}")
+    end
 
   end
 end

  @doc """
  Digits during a decimal context.
  """
  def parse(<<n, t::binary>>, [:decimal | context], output) when n in ?0..?9 do
    debug "Found digit #{<<n>>} during a decimal context", t, context, output
    parse(t, [:decimal | context], output <> <<n>>)
  end

  @doc """
  Digits in a bare array. Sets number context.
  """
  def parse(<<n, t::binary>>, [:array | context], output) when n in @number_start do
    debug "Found digit while in array: #{<<n>>}", t, context, output
    parse(t, [:number, :array | context], output <> <<n>>)
  end
