encoding/jsonschema: add structBuilder type
This type plays a key role in the upcoming jsonschema
refactoring: it moves the generation of the final syntax
from an ad-hoc approach to a more general approach
that allows placing a given piece of syntax anywhere
in the final result.
Even though it's not exported, the functionality
stands alone and could potentially be moved into
another package in time.
Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I68054a40d420ed1b27a887ee16395d15e21c97ee
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1205772
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>