induction j using json.json_rect with (P_list := fun l => loop_arr l l = true)
(P_list' := fun l => loop_obj l l = true).
- reflexivity.
- simpl.
specialize IHj with j.
rewrite IHj0.
rewrite IHj; reflexivity.
- reflexivity.
- simpl.
rewrite string_eqb_refl, IHj0.
rewrite IHj; auto.
- intros. now rewrite <- H.
- intros. rewrite <- H. simpl.
apply Bool.eqb_reflx.
- intros. rewrite <- H. simpl.
symmetry.
apply EqNat.beq_nat_refl.
- intros.
rewrite <- H.
simpl.
apply string_eqb_refl.
- intros.
rewrite <- H.
simpl.
assumption.
- intros.
rewrite <- H.
simpl.
assumption.
Qed.

Lemma json_eq_dec : forall j j' : json.t, {j = j'} + {j <> j'}.
Proof using.