Talk:Serialization
This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||
|
The contents of the Pickle (Python) page were merged into Serialization on 5 April 2017. For the contribution history and old versions of the redirected page, please see its history; for the discussion at that location, see its talk page. |
This article links to one or more target anchors that no longer exist.
Please help fix the broken anchors. You can remove this template after fixing the problems. | Reporting errors |
DotNet
[edit]any chance some one in the know could add someting about serializable objects in .NET (direct competition of Java?).
i would be much obliged.
jaspio
What about solutions in Perl (e.g. FreezeThaw) and/or using YAML (YAML)?
Spelling
[edit]isn't the term "marshaling" (with one 'l') instead of "marshalling"? the version with the double-l is only a noun, while the former has verb forms. therefore, all references to "marshall" should really be "marshal". for example, "marshaling" or "unmarshaled".
- Either is acceptable. Personally I like the double-l form better.
Send in the clones
[edit]We could add something about cloning using serialization. I wrote a Java example here : http://www.krunch.be/vrac/cours/04-05-2cinf/poo/CloneWithSerialization.java
Plain text
[edit]Writing out data structures in plain text ASCII is itself a serialization and any programming language that can handle text can do this. For example Java's toString() function is often used to serialize file formats rather than using the Serializable interface. The advantage of this primitive form of serialization is that it is simple. For example in C++ serialization is also implemented using streams. However streams have a lower level of data perspective. From an data objects perspective the end of file character is no important so implementing serialization while avoiding the pitfalls of streams is dangerous. However if serialization is implemented with C++ string then the string manages the memory buffer itself and the programmer is free to focus on just writing and reading the data structure. Or when nastly low level events occure they can be managed much better. In this case the primitive technology is better.
This kind of serialization I believe is a byte stream encoding. However it uses some universal character format such as ASCII so all kinds of programms and languages can understand it. For many file formats in applications space is not the issue, for example saving a users preferences in each file is often not that costly.
Also I belief Microsofts registary is a form of serialization. Qt a Gui framework also supports the registary concept accross multiple platforms.
Could someone please consider writing this perspective in the Serialization documentation. I am not confident about how to integrate this into the existing doc. As a programmer I came to this conclusion the hard way by writing with C++ streams, and then went back to the basic text files after much grief. So I am looking to separate serialization with low level implementation and managing text files is a valid way to do it.
Serialization using Qt
[edit]Can someone please give information on serialization using Trolltech's Qt (toolkit) library? The qt designer can save/restore the GUI in xml format, is there a tutorial how it is done? Thanks!
order
[edit]I think the code examples should be ordered alphabetically by programming-language name... this way, it looks like serialization support has a higher preference in certain language environments. what do ya think? 91.34.127.3 09:36, 9 July 2007 (UTC)
- It's part of assembly language, if you read the fine print on XOR with an Intel processor. The endian considerations are naturally part of more modern languages. So, if you really wanted a list for the degree of support, it would be in reverse order of date released. BrewJay (talk) 16:11, 14 July 2008 (UTC)
Suggested change of wording
[edit]In the first paragraph it reads as follows:
...to transmit it across a network connection link, either in binary form, or in some human-readable text format such as XML.
In my opinion this should be changed as any communication using a network link is ultimately done in binary form and only after having been transmitted is, if necessary, re-converted into it's original source-format for example XML. The current wording could give the false impression that XML can be sent over a network as is; which is not possible. In the first sentence:
into a sequence of bits
should be
into a sequence of bytes
- The bytes vs bits I definitely agree with. The first part, I'm not sure. While everything is ultimately dealt with in binary, it's useful to refer to things being transferred as XML (or some other format) :from a high level perspective. Everything is binary at the lowest level, formats like XML just imply that the binary data is structured in a specific way. Usually when one refers to binary files it :implies a lack of this type of formatting. There may be a better way to phrase it, honestly I think taking out the part about binary might clear it up. The way it's written does sort of imply that XML :is an alternative to binary, rather than a specific encoding. Broswald (talk) 19:39, 10 November 2014 (UTC)
Advertisement for library
[edit]Hello,
For this revision, does Wikipedia allow this type of advertisement ?
This is just a question —Preceding unsigned comment added by 213.56.245.172 (talk) 15:24, 3 October 2007 (UTC)
I'm in favor of removing it, this is not related enough to the subject and there is an open source alternative to this exact library that's not even mentioned. I will remove it, if anyone thinks this ad is justified please argue below. DanyX 17:50, 20 October 2007 (UTC)
---
The "C++ Middleware" reference now added to C++ section is also pure advertisement. :( — Preceding unsigned comment added by 88.89.1.237 (talk) 20:11, 14 February 2016 (UTC)
Relationship between serializing and differential execution
[edit]I took the liberty to add a paragraph (in the Uses section) about the relationship between serialization and differential execution. I hope nobody objects too much. I think differential execution is a technique that every programmer should have in their toolkit and know when to use it. Basically, the idea is that whenever a simple, structured procedure executes, it goes through a series of decision points. If it makes a record (by serializing) of these decision points, it can later replicate the path it took (by deserializing). If it does this simultaneously with another execution, it can tell how it is differing from its prior execution. It can also serialize/deserialize arbitrary data along the way and see how that has changed. If the data being serialized/deserialized are the properties of remote objects, such as controls in a user interface, those objects can be updated incrementally. For a trivial cost in performance, the benefit is a major reduction in source code. MikeDunlavey (talk) 14:14, 26 November 2007 (UTC)
SAVE ... that's the short definition.
[edit]When I read the word in IBM manuals about architecture, serialization was a step taken for using semaphores and inter-process communication. It ensures integrity of data that more than one processor uses. For example, before data from a buffer in RAM was used by the I/O channels, the CPU would execute a serializing operation--buffer flush, basically. The article doesn't contradict that idea. It seems to be about pretty much the same thing. BrewJay (talk) 10:47, 14 July 2008 (UTC)
Exception handling flawed in the example code
[edit]Yes, it's not the main concern in the examples, but a stream must always be closed inside a final clause. Also, the main method should throw the exception instead of ignoring it...
193.167.3.32 (talk) 14:08, 16 March 2009 (UTC)
Human-readable Serialization
[edit]Anyone know why the "Human-readable serialization" section goes from describing serialization to "Encoding"? Sounds like Serialization is equal to encoding according to this section, as in "Human-readable encoding". —Preceding unsigned comment added by 151.151.7.52 (talk) 17:42, 15 January 2010 (UTC)
Too many/verbose examples
[edit]This article contains too many examples, and most of them are a lot more verbose than necessary. We don't need examples for every language that supports some form of serialization (WP is not a manual), and we don't need an example that spans over several files. Any comments before I go ahead and trim that section? – Adrianwn (talk) 11:45, 1 June 2010 (UTC)
- I removed all examples because they don't really add to the understanding of serialization, and Wikipedia is not a programming cookbook. Additionally, I removed advertising and all links for various libraries. If anything, such links belong in the External links section or in a separate "Comparison of serialization libraries" article. – Adrianwn (talk) 14:51, 6 June 2010 (UTC)
What about data marshalling?
[edit]The term Data Marshalling redirects to this page, but the term isn't explained. [who writes that?] As I checked today redirection of Data Marshalling points to Marshalling (computer science). There it is very well explained. Discussion can be closed here. Ollio (talk) 22:04, 14 October 2014 (UTC)
Unserialize or deserialize?
[edit]The text uses both terms without explaining if one or both are correct. Does anyone know? Fabiovh (talk) 07:15, 29 June 2010 (UTC)
- As far as I know, "deserialize" is the correct term. The article uses it only for PHP, where the deserialization function is called "unserialize", and for external links, where the title uses this word. – Adrianwn (talk) 07:36, 29 June 2010 (UTC)
Language-independent serialization and related concepts
[edit]I'd prefer a short but good description of the general concept of serialization with references to related topics instead of endless code examples. Description of the underlying theory (Type systems) is poor and language-independent serialization formats like Apache Thrift, Protocol Buffers, Etch, Hessian etc. are not even mentioned. -- JakobVoss (talk) 09:40, 28 July 2010 (UTC)
Additional Programming language support
[edit]C++
[edit]Why not including the open source boost::serialize library ? It provides serialization in text, binary or xml archive. — Preceding unsigned comment added by Erekose64 (talk • contribs) 09:52, 30 March 2011 (UTC) Author of C++ middleware is using Wikipedia to promote his own (little-used) product. He should not be allowed to do so. — Preceding unsigned comment added by 173.79.220.90 (talk) 03:13, 15 February 2016 (UTC)
Javascript
[edit]A popular form of serialization for JavaScript is JSON (JavaScript Object Notation). Full details of JSON are available at http://www.json.org/.
Many languages are capable of handling JSON serialised data.
RQuadling (talk) 12:02, 9 September 2010 (UTC)
BSON
[edit]To add to the comment regarding JSON (which I agree, is quite popular today), a derived "open" serializations standard named BSON seems to be catching on. It is effectively a binary version of JSON, still a bit more verbose than some serialization methods, but is open and (mostly) directly convertable into JSON. The MongoDB project uses this as its native data storage format.
Perhaps a section on "open" vs. closed/proprietary serialization methods would be useful.
see: http://bsonspec.org/ —Preceding unsigned comment added by Boomhauer (talk • contribs) 21:23, 21 September 2010 (UTC)
Shady links
[edit]The second link in External links, http://www.studentacad.com/post/2009/11/26/aspnet-Callback-technique-using-csharp.aspx, results in this warning in Firefox 3.6:
"Reported Attack Page! This web page at www.studentacad.com has been reported as an attack page and has been blocked based on your security preferences. Attack pages try to install programs that steal private information, use your computer to attack others, or damage your system. Some attack pages intentionally distribute harmful software, but many are compromised without the knowledge or permission of their owners. "
--Mortense (talk) 17:02, 11 February 2011 (UTC)
Why not a giant list
[edit]This article seems to be mostly examples of serialisation, in the form of one or two line statements. At one point it even seems to devlove into what appears to be a direct debate between two or more contributors (Why not serialize everything? under the Java section). — Preceding unsigned comment added by 203.167.234.102 (talk) 03:39, 7 March 2012 (UTC)
Good encyclopedia writing!
[edit]"I had a nasty example of this with some student's code that used Swing classes that were "provided" serializable. "
Please fix :) — Preceding unsigned comment added by 132.64.26.158 (talk) 10:21, 12 March 2012 (UTC)
Multi-Language Serialization
[edit]I think it is important to mention standard OSS serialization projects such as Apache Avro, Apache Thrift and Google Protocol Buffers which permit serialization in complex systems using multiple programming languages.
https://en.wikipedia.org/wiki/Protocol_Buffers
https://en.wikipedia.org/wiki/Apache_Thrift
https://en.wikipedia.org/wiki/Apache_Avro — Preceding unsigned comment added by 108.168.48.5 (talk) 01:02, 6 July 2016 (UTC)
Merge with Pickle (Python)
[edit]If no one objects, I would like to complete the merge with the Pickle (Python) page. GBMorris (talk) 13:04, 31 January 2017 (UTC)
- @GBMorris:, Coincidentally, I was just about to do it- but you go right ahead, particularly if you have specialist knowledge. Cheers, O Fortuna!...Imperatrix mundi. 13:23, 31 January 2017 (UTC)
- @Fortuna Imperatrix Mundi:, I've never merged an article before, but I'll give it a shot.GBMorris (talk) 19:27, 1 February 2017 (UTC)
- @GBMorris: I'm sure programming in Python etc is far harder ;) simplest way, open up to parallel windows, with both pages up, and just follow the instructions at WP:PROMERGE. Best of luck! O Fortuna!...Imperatrix mundi. 19:34, 1 February 2017 (UTC)
- I confess that I was getting impatient, so went ahead and completed the merge. Feel free to review, edit, correct, tidy up, etc. Klbrain (talk) 18:09, 5 April 2017 (UTC)
- @GBMorris: I'm sure programming in Python etc is far harder ;) simplest way, open up to parallel windows, with both pages up, and just follow the instructions at WP:PROMERGE. Best of luck! O Fortuna!...Imperatrix mundi. 19:34, 1 February 2017 (UTC)
- @Fortuna Imperatrix Mundi:, I've never merged an article before, but I'll give it a shot.GBMorris (talk) 19:27, 1 February 2017 (UTC)
External links modified
[edit]Hello fellow Wikipedians,
I have just modified 2 external links on Serialization. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
- Corrected formatting/usage for http://support.microsoft.com/kb/301116/en-us
- Added archive https://web.archive.org/web/20070122194723/http://java.sun.com/j2se/1.4.2/docs/guide/serialization/index.html to http://java.sun.com/j2se/1.4.2/docs/guide/serialization/index.html
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}}
(last update: 5 June 2024).
- If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
- If you found an error with any archives or the URLs themselves, you can fix them with this tool.
Cheers.—InternetArchiveBot (Report bug) 16:23, 6 June 2017 (UTC)
Justification for Article Tag: Written Like a Debate?
[edit]I don't understand the justification for the tag at the top of this article that says it "reads like a debate" rather than an encyclopedia article. Can anyone point out examples of this? This article seems very well written and well referenced. The fact that there is a Disadvantages section is not a bad thing, most technical articles could use such a section. If no one can explain the reason for this tag in a few days I'm going to remove it. --MadScientistX11 (talk) 18:24, 17 June 2020 (UTC)
Done --MadScientistX11 (talk) 12:42, 23 June 2020 (UTC)
- C-Class Computing articles
- Low-importance Computing articles
- C-Class software articles
- Mid-importance software articles
- C-Class software articles of Mid-importance
- All Software articles
- C-Class Computer science articles
- Low-importance Computer science articles
- C-Class Java articles
- Mid-importance Java articles
- All Computing articles