encoding/jsonschema: use unique item values in Generate
We now store all items canonicalized by structural equality
so that we can compare items with simple equality.
This makes it straightforward to use a map in `generator.makeStructItem`
rather using an triply nested DeepEquals loop.
We're still using `reflect.DeepEquals` as the fundamental source
of truth for equality for now, but we're leaving that for a future
change (either by writing custom equality methods/functions
or by writing some reflect-based equality code that's appropriate
for this scenario).
Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I8de5d0d36eea8ab26da48a0af5ebbb35b47f32c8
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1224574
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>