Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2014-07-12 05:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (238 votes), past polls