Hello
I'm writing an iPhone app using JSON framework. I couldn't serialize an NSObject, I found only serialize for nsstring, nsarray, nsdata, but I want to serialize a generic object from template object; any class library for this?
I have a user class, with userid, username and password. I want to serialize this class and send to serve...
Hi, I've added the reference to System.Runtime.Serialization dll to my project but still can't find the System.Runtime.Serialization.Json namespace and hence can't find the DataContractJsonSerializer class. What am I missing here?
...
Hi,
I'm have a Silverlight 3 UI that access WCF services which in turn access respositories that use NHibernate. To overcome some NHibernate lazy loading issues with WCF I'm using my own DataContract surrogate as described here: http://timvasil.com/blog14/post/2008/02/WCF-serialization-with-NHibernate.aspx. In here I'm setting preserveO...
Hi - Webmethod returns an array of objects - something like this
{"d":
[[{"Amount":100,"Name":"StackOverflow"},
{"Amount":200,"Name":"Badges"},
{"Amount":300,"Name":"Questions"}]]}
On the client-side, when the JSON is referenced using msg.d, I get a
msg.d is undefined
error. I am using jQuery JavaScript Library v1.4.2
How do I a...
How to deserialize "<MyType><StartDate>01/01/2000</StartDate></MyType>"
below is the MyType definition
[Serializable]
public class MyType
{
DateTime _StartDate;
public DateTime StartDate
{
set
{
_StartDate = value;
}
get
{
return _StartDate;
}
}
}
...
Hello,
I have small class called 'Call' and I need to store these calls into a flat file. I've made another class called 'CallStorage' which contains an array where I put these calls into.
My problem is that I would like to store this array to disk so I could later read it back and get the calls from that array.
I've tried to achieve ...
I have a serialized array of values saved to a file and need to change the value of one of the variables. In the example I change the value of $two and then save the whole array back into the file with the new value.
Is there a more efficient way of altering just the single value with out having to read and write the entire file/array.
...
I'm attempting to serialize a significant amount of binary data out to a custom file format using System.IO.Packaging.Package and PackagePart. I'm attempting to use a BinaryFormatter to output a set of detailed medical imaging datasets to distinct parts within a file/package.
I can use the BinaryFormatter to output all my data direc...
One of the huge benefits in languages that have some sort of reflection/introspecition is that objects can be automatically constructed from a variety of sources.
For example in Java I can use the same objects for persisting to a db (with Hibernate) serializing to XML (with JAXB) or serializing to JSON (json-lib). You can do the same in...
I have two classes X and Y, like this:
class X implements Serializable
{
int val1;
Y val2;
}
class Y implements Serializable
{
int val;
}
I want to transmit an object of type X from a client to server but i can't because the class X has a field of type Y. I replaced the field of type Y with a field of type X in class X and it w...
I have a very odd exception in my C# app: when trying to deserialize a class containing a generic List<IListMember> (where list entries are specified by an interface), an exception is thrown reporting that "the type ...IListMember is not marked with the serializable attribute" (phrasing may be slightly different, my VisualStudio is not i...
the question is one of design. i'm gathering a big chunk of performance data with lots of key-value pairs. pretty much everything in /proc/cpuinfo, /proc/meminfo/, /proc/loadavg, plus a bunch of other stuff, from several hundred hosts. right now, i just need to display the latest chunk of data in my UI. i will probably end up doing some ...
I need to convert a Vector to a String (an vice versa) to be stored in a CHAR field in a database. What is the most efficient way to do this ?
...
So I'm serializing a C data structure for cross-platform use, and I want to make sure I'm recording my floating point numbers in a cross-platform manner.
I had been planning on just doing
char * pos;
/*...*/
*((double*) pos) = dataStructureInstance->fieldWithOfTypeDouble;
pos += sizeof(double);
But I wasn't sure that the bytes wo...
I am attempting to create a wcf service that accepts any input (Action="*") and then deserialize the message after determining its type. For the purposes of testing deserialization I am currently hard-coding the type for the test service.
I get no errors from the deserialization process, but only the outer object is populated after des...
Hi Everyone,
I'm wondering if there is a fast way to dump an STL set to disk and then read it back later.
The internal structure of a set is a binary tree, so if I serialize it naively, when I read it back the program will have to go though the process of inserting each element again. I think this is slow even if it is read back in co...
I have an interface like this
public interface IField<T> extends IsSerializable {
public String getKey();
public void setKey(String name);
public T getValue();
public void setValue(T role); }
And a class like this
public class FieldImpl<T> implements IField<T> {
private String key;
public String getKey() {
return key;
}
public...
I'm trying to read encrypted struct data from file using fread(). once i get the decrypted struct bytes, I'd like to it put them back into this struct.
struct data
{
std::string s1;
std::string s2;
std::string s3;
LONG l;
};
how would you convert a struct into bytes which can be reconstructed from bytes?
...
I am developing game editor in c++.I have implemented reflection mechanism using DiaSDK.Now I want to store state of the objects(Like Camera,Lights,Static mesh) in some level file via serialization.
And later on able to retrieve their state via deserialization.Serializing objects is not a problem for me.During deserialization I am gettin...
When C# app is ran, it POSTS a request to the PHP server, which wants to return an array. What's an easy way to load this array's contents into C# for using with there.
For clarification, this array is a PHP stdClass object that contains strings, floats, and other stdClass objects. I want to get a similar data structure on the C# end ...