Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Replacement of Bracketed Expressions for JSON output

by ELISHEVA (Prior)
on Feb 28, 2011 at 09:09 UTC ( #890534=note: print w/replies, xml ) Need Help??

in reply to Replacement of Bracketed Expressions for JSON output

If you are regularly working with JSON, have you considered using JSON?

I realize there are times when one just wants something quick and dirty and throwaway. However, if this is more than a one-off throw-away need, devoting time to developing a collection of regexes to work with a well established streaming format seems to me a bit foolish. The code one writes will not have anywhere near the degree of long term reusability and reliability that a proper parsing module will.

For example, can you be sure that your arrays will always have only scalar elements? What about arrays nested in arrays? Arrays of hashes? That isn't even a question you need to worry about if you use a module that knows how to parse JSON in full.

  • Comment on Re: Replacement of Bracketed Expressions for JSON output

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://890534]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2021-02-26 16:41 GMT
Find Nodes?
    Voting Booth?

    No recent polls found