     test "object with wrong string key delimiter" do
       assert {:error, _} = JSON.parse("{'65': 23}")
     end
+    test "consecutive booleans in array, no comma" do
+      assert {:error, _} = JSON.parse("[true false]")
+    end
+    test "comma at start of array" do
+      assert {:error, _} = JSON.parse("[,true]")
+    end
+    test "comma at end of array" do
+      assert {:error, _} = JSON.parse("[false,]")
+    end
+    test "comma at start of object" do
+      assert {:error, _} = JSON.parse("{,\"b\":true}")
+    end
+    test "comma at end of object" do
+      assert {:error, _} = JSON.parse("{\"a\":false,}")
+    end
 
   end
 end

      json_length = String.length @huge_json
      times = 100
      t = Time.now
      for n <- 1..times do
        JSON.parse(@huge_json)
      end
      t_end = Time.now

  alias TheOneTrueJSON, as: JSON

  # just for reference mainly
  @contexts { :string, :number, :decimal, :exponent, :array, :object, :pair, :key, :value, :boolean, :comma_or_close_array, :comma_or_close_object }
  @whitespace '\s\n\t\r'
  @number_start '-0123456789'
  @digits ?0..?9
