Subject: [httpwg/http-extensions] Identifying top-level data types (#476)

From: HTTP issue updates <[email-masked]>
Date: Thu, 01 Feb 2018 15:26:08 -0800

Right now, Structured Headers allows the following types at the top level:

* Dictionaries
* Lists
* Parameterised Labels
* Items

Items' types can be identified by inspecting their first character, and #443 covers parameterised labels.

However, there isn't any easy way for a parser to identify whether the top-level data type is a dictionary or a list. As a result, a parser will need a hint as to what kind of top-level data type is expected for a given header.

It seems like the options are:

1) Make it possible to distinguish these data types on the wire; e.g., dictionaries start with `{`, lists start with `[`.

2) Require parsers to have external information about what's being parsed, at least at the top level. E.g., the parser could expose four functions, `parseList`, `parseDict`, `parsePlabel`, `parseItem`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/httpwg/http-extensions/issues/476