serialize

R: serialize base64 encode/decode of text not exactly matching

in my previous question about using serialize() to create a CSV of objects I got a great answer from jmoy where he recommended base64 encoding of my serialized text. That was exactly what I was looking for. Oddly enough, when I try to put this in practice I get results that look right but don't exactly match what I ran through the serial...

Sending binary data over IPC from C to Python

Hi All I have a C program and a Python program on the same machine. The C program generates some data in nested structures. What form of IPC is the best way to get this data across to the python program? Serializing in C (especially nested structures) is a real bear, from what I hear, due to lack of serialization libraries. I am not...

Serialize static attributes in Java

What happens if i'll try to serialize an attribute which is static? thanks ...

Serialize jquery sortable

Hello all, I have been digging around on this site and googling for a while now and I cannot find a good solution to my problem. I would like to be able to save the state of my jquery portlets on a page. I would rather not have a "save state" button if I can avoid it. Anyway, I just have the jquery code copied from their portlet examp...

Why can't we serialize the methods in Java ?

Serialization is a mechanism of storing the state of an object. Based on this definition we can say that the instance variables in an object can be serialized. Methods are behaviors of the class. We can set and get the state of an object using the methods. So the methods are related to the instance variables of the class. Then why c...

How to handle slashes in strings in arrays for serialize function in php?

I think the title says it, as well...but of course some more explanation assume i have an array containig strings. if one of my strings contains slashes, like "red/blue/green" there will be troubles when i use the serialize/unserialize function of php and storing/loading the value in a session-variable. if you have nested large arrays ...

Keep settings in sync between forms application and windows service (or any n-tier, really)

I have a Windows Service that performs a number of periodic activities, and I want to change the settings of this service from a Windows Forms app. I'm not sure, though, about the best way to make sure the service has the most updated user preferences in it (how often to run, what folders to use for things, whatever else the user can spe...

Dear Santa - Storing multi-lingual data in serialised php in mysql!

Dear Santa, I hope you're reading this! I have to insert some data into a MySQL table. The data will be retrieved and then (at present) unserialized at which point the correct display language will be selected... I've managed to munge the data (text encoded with markdown) into a set of PHP statements, roughly along the following line...

XML Serialize anonymous class C#

Hi, The JSON script serializer (from mvc) can serialize an anonymous class to script. Are there some standard framework (or mvc) classes that can transform an anonymous class to xml? Currently anonymous classes are not marked as serializable and cannot be converted to xml. Is there a way to do this without writing reams of code? Chee...

How to convert Jquery.serialize() data to JSON object?

Is there any better solution to convert a form data that is already serialized by jQuery function serialize(), when the form contains multiple input Array fields. I want to be able to convert the form data in to a JSON object to recreate some other informative tables. So tell me a better way to get the serialize string converted as a JSO...

Updating serialised array in mysql (without unserialising?)

Everything I've read says that storing serialised arrays in Mysql is a bad idea - I know that already ;) Unfortunately I'm working with an open source script that uses this method, and changing the structure isn't an option in this scenario. Is it possible to update this URL without first unserialising? I originally tried using replace...

Removing objects form serialize data

I am trying to integrate two PHP scripts (app1, app2) and I am trying to get session data from app1 in app2. The problem is when I am trying to unserialize the session data from app1 I am getting a small ton of errors because PHP is trying to find the __wakeup() function for each of the objects. I can't use the unserialize_callback_fu...

jQuery post a serialized form then inserting into mysql via php?

Hello, I'm trying to post a serialized form to a sumbit.php file, in turn, will then insert into a MySQL database; however, the last input which is hidden, is not getting inserted into the database, though the rest are. Here's some snippet examples of what I've got thus far which is not working: HTML <form method="post" ...

Characters to separate value

Hi, i need to create a string to store couples of key/value data, for example: key1::value1||key2::value2||key3::value3 in deserializing it, i may encounter an error if the key or the value happen to contain || or :: What are common techniques to deal with such situation? thanks ...

jQuery UI Sortable serialize not working!

The notes on UI Sortable 'serialize' says it creates a passable array based on the ID of the sortable list. You're supposed to use an ID with a name and underscore "foo_" and it creates an array -> foo[1], foo[2], etc. However, it does not work. I'm getting a result that looks like this: '[] = foo_1, [] = foo_2, etc. Has anyone else had ...

PHP Accessing a child's private properties in parent

Hi I have a parent object that I use for general CRUD in my applications - it has basic save & retrieve methods so I can don't have to reinclude them them in all my objects. Most of my child objects extend this base object. This has worked fine, but I'm finding a problem with retrieving a serialized child object. I use a "retrieve" meth...

Serialized data in a MySql Database to use in a Business Intelligence tool

Hi, I have a database (MySql) and need to store some results from a web service monthly. The data can have 10 results today but may have 200 next month. I need to use a BI tool to create charts and what not. Someone proposed to serialize the data and save the blobs in the database, while the solution seems to work, I have a gut feel...

Handling of Japanese with Jquery.serialize();

Hoo boy. A weird one I guess! getting input from a form, I want to make sure there are no western characters, punctuation or numbers before sending it to a php script for creating some xml... from form name = "a" $('form').submit(function() { text = ($(this).serialize()); text = text.substr(2,text.length) text = text.replace(/[^\u3...

What is the difference between XmlArrayAttribute and XmlArrayItemAttribute?

What is the difference between XmlArrayAttribute and XmlArrayItemAttribute? Please explain both sides (i.e. serialzing and deserialzing). ...

Send Serialize Class with asyncronous socket

hi guys, i want to make a client - server application in c# with asyncronus socket programming and i want to send a simple image file from client to another client connected to the server. I've a serialized class that contain the property as username ecc.. and a variable in byte that containt an array of byte of image. The problem is t...