Skip to content

tagging typed data in JSON: should we? #197

Description

@rjbs

I wrote a little Data::Printer filter for my own use, which annotates data that are clearly typed by being JSON::Typist or JSON::x::Boolean objects. So instead of:

[
  [0] "foo"
  [1] 90210
  [2] true
  [3] "bar"
]

You could get:

[
  [0] "foo" [jstr]
  [1] 90210 [jnum]
  [2] true  [jbool]
  [3] "bar"
]

Where 0 is a JSON::Typist::String string and 3 is just a plain scalar.

I find this useful in debugging problems, and @garu suggested maybe we should apply it to Web. But it will be a visible change, so I'd like to get confirmation that we want this before I write a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions