Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

How does it not help much? I mean this as a sincere question, not to sound harsh or critisizing. I'm just wondering which part is causing you troubles.

The synopsis pretty much gives you what you need, only you need to fill in the blanks. And there are plenty of blanks, which the module's documentation authour couldn't know. For example, what are you trying to do? Do you need to read JSON data and have it converted to a native Perl data structure? Or do you have a Perl data structure which you need serialized into JSON? Whatever the case, the following blanks to be filled in is: what will the source data look like? How will you obtain it? Is the source data in exactly the same format as you want your output to be, or do you need to switch around bits and pieces? Which? How? Why?

All of these questions are out of scope for the JSON docs.

For example, do you want to read in the ID3 tags of all MP3 files in a given directory, and store all metadata for all songs in one big JSON file? You can do that, but you will have to figure out how to pull the ID3 tags from the MP3s and in which structure you want to store everything.

Are you querying a webservice, which will respond with a one megabyte long string of JSON data, of which you need to extract one specific element, but where there is a complicated set of logical rules to determine where that element lives inside the structure? The JSON will make that a lot easier for you, by giving you one function call to convert the JSON to a data structure that's convenient to work with in the Perl language. But determining which element you want to get, and actually getting it? That's still up to you.

So, I ask again, what part is it that you don't understand?


In reply to Re: How to read CPAN documentation by muba
in thread How to read CPAN documentation by perl.j

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (4)
    As of 2014-09-24 02:52 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (244 votes), past polls