https://bugzilla.wikimedia.org/show_bug.cgi?id=51111

Daniel Kinzler <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Daniel Kinzler <[email protected]> ---
Some thoughts:

* as a context, we can either provide a data type ID, or, for convenience, a
property ID.

* we need validation, parsing, and formatting. since we often need combinations
of these, they could be combined in a module, so these operations can be
performed in a single call. Perhaps like this:

- input is either given as JSON, or as a string. In the latter case, it is
parsed to get the JSON structure.
- a DataValue is constructed from the JSON structure, based on info from the
data type.
- validation is always performed on the DataValue
- the result is the DataValue serialized as JSON (could be omitted if that was
the input)
- in addition, a formatted version of the DataValue can be requested as output. 

* Note that formatting can depend on a lot of factors: data type, desired
output format (html?), current language and variant, user settings (e.g. babel,
perhaps even preferred unit system), etc.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to