Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Optimization Question (Data Serialization)

by stevieb (Canon)
on May 16, 2016 at 00:02 UTC ( [id://1163102]=note: print w/replies, xml ) Need Help??


in reply to Optimization Question (Data Serialization)

JSON or Storable?

If you don't have complex circular references or other oddities, both should work (JSON is cross-language, where Storable isn't).

Replies are listed 'Best First'.
Re: Optimization Question (Data Serialization)
by jonadab (Parson) on May 16, 2016 at 00:21 UTC

    Hmm. I looked at YAML briefly, but it didn't seem to quite do what I needed, unless I missed something. I thought JSON was basically a more Javascript-oriented variant of YAML, so I didn't consider it. I'll look at that.

    Update: Yes, I think JSON will indeed do what I need. Thanks!

      YAML is essentially a superset of JSON. The default formatting of YAML is considered more readable than JSON (at least by me). Either protocol turns out to be somewhat less easy to hand edit accurately than it first glance it seems it should be. That may not be an issue, but readability will make it easier to debug configuration issues at least.

      Premature optimization is the root of all job security
        YAML is essentially a superset of JSON.

        Not for beancounters: Re^2: conf file in Perl syntax

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

        Neither is sufficiently human-editable that I would really want it for config files.

        But that isn't important for a save-game feature.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-03-29 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found