Polymorphic JSON for aliased_namespaces ([] or {...})
Summary:
JSON parser in hhbc_options.ml expects `hhvm.aliased_namespaces` to be:
- JSON array (`[]`) if empty
- JSON object (`{}`) in general (non-empty doesn't parse as array!)
Instead of adding complexity by providing custom deserializer visitor
that looks into the JSON value associated with such keys,
and putting the burden of remembering that default SerDe isn't enough
for every potentially new option that is added in the future
(which is exceptionally represented as [] instead of {} when empty),
just introduce the wrapper type and a convenience method `as_map`
that gives back the unwrapped map.
Reviewed By: dabek
Differential Revision:
D19954265
fbshipit-source-id:
20d63dc813123523ba4d3a153dff1181335aa77a