You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If set to true, the JSON-LD processor is allowed to optimize the output of the Compaction algorithm to produce even compacter representations. The algorithm for compaction optimization is beyond the scope of this specification and thus not defined. Consequently, different implementations MAY implement different optimization algorithms.
I think it would be advantageous to replace this option with a strict option (defaulting to true) defined as follows:
If set to true, the JSON-LD processor or library MUST produce exactly the same results as the algorithms defined in this specification. If set to false, the JSON-LD processor or library is allowed to extend or modify the algorithms defined in this specification to enable application-specific optimizations. The definition of such optimizations is beyond the scope of this specification and thus not defined. Consequently, different implementations MAY implement different optimizations.
Another alternative (perhaps more future-proof) would be to change optimize to processingMode and specify a single mode json-ld-1.0:
If set to json-ld-1.0, the JSON-LD processor or library MUST produce exactly the same results as the algorithms defined in this specification. If set another value, the JSON-LD processor or library is allowed to extend or modify the algorithms defined in this specification to enable application-specific optimizations. The definition of such optimizations is beyond the scope of this specification and thus not defined. Consequently, different implementations MAY implement different optimizations. Developers MUST NOT define modes beginning with json-ld as they are reserved for future versions of this specification.
The advantage would be that it might be simpler to introduce mechanisms such as framing without having to update the whole API spec. The downside might be that multiple competing modes will establish, but the same is the case with an optimize or strict flag.
PROPOSAL 1: Change optimize flag to strict flag as defined above.
PROPOSAL 2: Change optimize flag to processingMode option as defined above.
The text was updated successfully, but these errors were encountered:
RESOLVED: Change 'optimize' flag to be a 'processingMode' option. The default value for JSON-LD 1.0 processors is 'json-ld-1.0'. Implementers may accept other values, but must ensure that those values are not prefixed with the string 'json-ld'. If the processingMode is set to 'json-ld-1.0', the outcome must be the same as the algorithms.
We currently have an
optimize
option in JsonLdOptions (defaulting to false) which is defined as follows:I think it would be advantageous to replace this option with a
strict
option (defaulting to true) defined as follows:Another alternative (perhaps more future-proof) would be to change
optimize
toprocessingMode
and specify a single modejson-ld-1.0
:The advantage would be that it might be simpler to introduce mechanisms such as framing without having to update the whole API spec. The downside might be that multiple competing modes will establish, but the same is the case with an
optimize
orstrict
flag.PROPOSAL 1: Change
optimize
flag tostrict
flag as defined above.PROPOSAL 2: Change
optimize
flag toprocessingMode
option as defined above.The text was updated successfully, but these errors were encountered: