Serialization Methods

Various serialization methods.

Page 1 of 1

4 Replies - 1002 Views - Last Post: 04 November 2007 - 06:14 PM Rate Topic: -----

#1 grimpirate  Icon User is offline

  • Pirate King
  • member icon

Reputation: 149
  • View blog
  • Posts: 714
  • Joined: 03-August 06

Serialization Methods

Posted 03 November 2007 - 11:20 AM

I've found three serialization methods and was curious if anybody else could think of some that weren't language proprietary.

Is This A Good Question/Topic? 0
  • +

Replies To: Serialization Methods

#2 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5833
  • View blog
  • Posts: 12,687
  • Joined: 16-October 07

Re: Serialization Methods

Posted 03 November 2007 - 04:54 PM

View Postgrimpirate, on 3 Nov, 2007 - 02:20 PM, said:

I've found three serialization methods and was curious if anybody else could think of some that weren't language proprietary.


I'd don't know that I'd call some of those proprietary so much as specific. Serialization, the serializing of objects into a format that can be saved and later retrieved, must be language specific. Indeed, you don't really serialize the entire object so much as the elements that are unique the instance.

Microsoft's .NET has a built in mechanism for serialization.

The closest thing you'd get to non language specific serialization is probably the implementation of web services or some RPC layers. However, in the end, they're getting mapped into a language.
Was This Post Helpful? 0
  • +
  • -

#3 grimpirate  Icon User is offline

  • Pirate King
  • member icon

Reputation: 149
  • View blog
  • Posts: 714
  • Joined: 03-August 06

Re: Serialization Methods

Posted 04 November 2007 - 12:29 PM

There are certain things in all programming languages which are common. For instance, integers and strings. These are non language specific. Their implementation might be different with each language but their human-readable output should be the same. Many object oriented languages like Java and PHP offer serialization methods, this is a language specific serialization method. YAML for instance defines a standard of serialization. It is up to the language to serialize into YAML and then to unserialize out of YAML. The implementations are specific, the serialization method itself isn't necessarily. YAML also provides for a way to define language-specific objects/datatypes/etc. Therefore, it allots for that which may be beyond the "standard" programming context.
Was This Post Helpful? 0
  • +
  • -

#4 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5833
  • View blog
  • Posts: 12,687
  • Joined: 16-October 07

Re: Serialization Methods

Posted 04 November 2007 - 05:48 PM

Very well, sounds like you're looking for XSD. It's open, standard, non language specific. It defines objects in WSDL, which is used the discovering and definition of web services. It's used by SOAP.

As mentioned before, it sounds like you're looking for the technologies used in Web Services. I don't really know what else to offer, it sounds like you a have specific set of expectation.

Hope this helps.
Was This Post Helpful? 0
  • +
  • -

#5 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Serialization Methods

Posted 04 November 2007 - 06:14 PM

well JSON is used with Java, that does not mean that I can't read it in C++...

Basically the best "language independent" way to exchange object data would be XML (or one of the xml technologies used with soap and wsdl).

What you are talking about here is just data exchange. You serialize an object meaning that you save all of its data (though not all data can be serialized and still work when it is decoded... such as a file handle). Then you read the data back in and "reconstruct" the object.

As far as I know there is nothing that stops you form using any of these other methods from another language, so long as you are willing to write your own encoder/decoder.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1