I am trying to post a javascript array to a php page. The array has to be associative. My structure looks like this:
<input id="test" value="1" class="settings" />
<input id="test1" value="2" class="settings" />
When I create the array it is:
var myArray = new Array();
$(".setttings").each(function(){
myArray[$(this).attr("id")...
For example: Object A contains Object B that contains Object C that contains Object A.
Will Object A serialize properly?
Comment #9 here indicates that it does not work .
In contrast, XStream indicates that it does handle cyclic references.
...
Using $('#form').serialize(), I was able to send this over to a PHP page. Now how do I unserialize it in PHP? It was serialized in jQuery.
Thank you !!
...
I have a very basic class that is a list of sub-classes, plus some summary data.
[Serializable]
public class ProductCollection : List<Product>
{
public bool flag { get; set; }
public double A { get; set; }
public double B { get; set; }
public double C { get; set; }
}
...
// method to save this class
private void Save...
I am coding in GDI+ C++,
I want to serialize StringFormat into file.
How can I do this ?
Many thanks!
...
I want to pass a serialized Perl data structure as a GET variable to a CGI application. I tried Data::Serializer as my first option. Unfortunately the serialized string is too long for my comfort, in addition to containing options joined by '^' (a caret).
Is there a way I can create short encoded strings from perl data structures so tha...
The followings are my code:
Code for serialization:
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
public class Serializer
{
public Serializer()
{
}
public void SerializeObject(string filename, ObjectToSerialize objectToSerialize)
{
Stream stream = File....
I can't figure this out as I go through demos that seem to work. I have a WCF service I was trying to use Linq to SQL with. However, all I ever get is the error System.Data.Linq.Table cannot be serialized. So I started with my own class thinking I could build it back up until get the error. Problem is I get the error even trying to use ...
I'm using jQuery.
serialize seems not fit for this job.
...
I've got a SubSonic DAL - works great.
Two classes: TblReceipt and TblReceiptLineItems.
I can create a parallel class of TblReceipt, but seems like a waste, so here's what I need to do:
Have a Class TblReceipt with one additional member, "ReceiptLineItems" - which is simply an ArrayList. This array list will be populated with TblRec...
I'm trying to serialize some data for a UDP packet stream and I'm getting a huge overhead from serialization. If I encode a FileData with a 1k Byte array I get back 2312 bytes. How would I reduce this overhead without encoding and decoding everything myself?
[<Serializable>]
type Response =
| FileSize of String * int64
| FileD...
I create variables model which have two attributes name and value for saving any options in my site. What I want to know is do I need any special method like serialize to make rails recognize data type after it read or before it write to db ?
I try it without serialize :value but only data type work are array hash and string the others ...
The goal is to unserialize a PHP serialized string and get sutable object in C#
Is there any way to make this possible in C#(.Net)?
To be more specific:
We need to make an application which comunicates (Via HTTP) to specific website which returns the needed information. Fortunately/unfortunately we dont have permission to website so th...
I have an array of Shift objects that I'm working with in PHP. I need to store these objects within a database. I'm working on a function that will add shifts to the database:
$Serialized_S = get_option('MasterShiftString');
$MasterShiftArray = unserialize($Serialized_S);
if(!$MasterShiftArray)
{
echo "MasterShiftArray returns false";...
I have a class structure in C#, similar to the following:
[DataContract]
class Data
{
[DataMember] public List<Hotel> Hotels { get; set; }
// etc...
}
[DataContract]
class Hotel
{
[DataMember] public int HotelID { get; set; }
[DataMember] public string HotelName { get; set; }
// etc...
}
I've been serializing this...
I'm trying to verify that certain fields in my form are numeric and not text.
Where would I start ?
If the fields are numeric, then serialize, if not then send an empty string.
The reason I want to do this is because PHP sees the data for each variable as a string and not numeric.
this is my ajax request
$.ajax({
type: "POST...
I wrote below code
HybridDictionary state = new HybridDictionary();
using (MemoryStream buffer = new MemoryStream())
{
BinaryFormatter formatter = new BinaryFormatter();
formatter.Serialize(buffer , state);
_backup.Push(buffer .ToArray());
}
but I got error ...
This is what I have so far.
The code I have is contained in php so there is some php in it.
$(document).ready(function() {
$(\"ul.droptrue\").sortable({
connectWith: '.droptrue',
remove:function(event, ui){
var order = $(ui.item).serialize;
alert( order );
},
receive : fu...
Is it possible to get the serialized list of items from a UL in jquery by calling the serialize method directly instead of using a callback? The code snippet:
var sortableLinks = $("#category_links_list_3");
var linkOrderData = $(sortableLinks).sortable('serialize');
category_links_list_3 is the id of the UL
The DOM structure is:
<...
Hello Guyz,
Presently I need to serialize one of my object which contains more my own classes object.
But the problem is I dont want to save it in a file and then retrieve it into memory stream.
Is there any way to directly serialize my object into stream.
I used BinaryFormatter for seializing.
First I used a MemoryStream directly to t...