FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

tree: Add data input and output APIs

Open CraigMacomber opened this issue 7 months ago • 3 comments

Description

Currently tree has some issues related to ambiguity. Some ways to round trip data can lose type information in some cases.

This PR shows how to detect and avoid schema with those problems, and provides APIs to do data input put and out which leverage that, as well as avoid it (the verbose APIs).

Reviewer Guidance

The review process is outlined on this wiki page.

Details like incorrect API tagging, missing exports, missing implementations are known: feedback on them is not needed yet.

Open Questions:

  • How should error handling work? create can fail due to ambiguity of invalid data (ex: NaN), but we might also want a version that takes more relaxed type, and thus can error in more cases. Should it error as thrown exceptions, or report back structured errors? Maybe ad a tryCreate that returns errors?

CraigMacomber avatar Jul 25 '24 19:07 CraigMacomber