As raised in #2 , there may be utility in exposing validation capabilities for xAPI statment component objects (e.g. verbs, actors, etc) independent of an entire statement.
My present thinking is a two-parameter function returning a report object.
-
target param that's either a JSON-string or an object
-
optional version param that is a Semantic Version 1.0 compliant string, or an object formulated like
{
major:1,
minor:0,
patch:0,
preRelease:null
}
Defaulting to "1.0.0"
-
returns a report object that includes:
- validated
version string
- input
target param post-deserialization as instance
errors array. The trace property value conventions in errors may also merit revisiting to remove prefix-cruft.
Possible targets:
- Verb
- Actor
- Agent
- Group
- Context
- Object
- Activity
- Result