Questions tagged [marshalling]

Marshalling is the process of transforming the memory representation of an object to a data format suitable for storage or transmission

Marshalling is the process of packing parameters to a message. The reverse process is called unmarshalling. The accurate definition of marshalling differs across programming languages such as Python, Java, and .NET, and in some contexts, is used interchangeably with serialization. The term is also used in RPC steps. For example marshalling in Java is the process of converting Java objects into XML format (JAXB).

Read more:

  1. Marshalling on WikiPedia
  2. Marshalling in Python
  3. Marshalling in Golang
  4. Marshalling in Java (JAXB)
  5. Marshalling in .NET
  6. Marshalling in Ruby
3730 questions
1
vote
1 answer

How to get the string from an unmanaged void* parameter?

[DllImport("SiUSBXp.dll", CharSet = CharSet.Auto, EntryPoint = "SI_GetProductStringSafe")] static extern SI_STATUS GetProductString( int dwDeviceNum, out IntPtr lvpDeviceString, int…
Piglet
  • 27,501
  • 3
  • 20
  • 43
1
vote
0 answers

Bug in Golang xml/encoding RawToken()?

I have a Go code: xmlData := `` xmlDec := xml.NewDecoder(bytes.NewReader([]byte(xmlData))) rawToken, _ := xmlDec.RawToken() fmt.Println(rawToken) Now interesting part, let's use Go 1.14.0 Output: {{ foo} [{{xmlns } url}]} Switch…
AnthonyGP
  • 47
  • 2
1
vote
0 answers

The problem with escaping characters in Golang

There is the following program: package main import ( "encoding/xml" "fmt" ) type XMLData struct { XMLName xml.Name `xml:"tags"` Tags []Tag `xml:"tag"` } type Tag struct { Text string `xml:"text,attr"` } func main() { …
12iq
  • 83
  • 5
1
vote
2 answers

Return array of integers from cross-platform DLL

I created a cross-platform DLL in C++ that compiles on both Windows and Mac OSX. On Windows, I have a C# app that calls the DLL using P/Invoke and on Mac OSX, an objective C app calls the DLL. I have simple functions working just fine but I need a…
simon.d
  • 2,471
  • 3
  • 33
  • 51
1
vote
3 answers

Interop C# IntPtr to C void* to C++ PCCERT_CONTEXT and back again

I'm needing to use C++ to get a certificate from the local machine store because Unity & Mono don't support the local machine store correctly. To that end I've implemented the following, but my knowledge of pointers, references, address of and C++…
Reahreic
  • 596
  • 2
  • 7
  • 26
1
vote
1 answer
1
vote
2 answers

Passing array of structs from C# to C++

I am trying to create C# code which calls a function in a DLL with a C interface. I am a C and C++ expert but my knowledge of C# is pretty limited. I have already managed to load the DLL into the C# program and to call functions whose interfaces use…
h.s.
  • 139
  • 9
1
vote
0 answers

How to marshal paragraph data (org.docx4j.wml.PPr class) and unmarshal it back again?

I am following @JasonPlutext's approach to edit word document on browser from here docx-html-editor. The code here maintains http session and saves design and formatting information in session cookie throughout the entire roadtrip (docx-html-docx)…
1
vote
1 answer

strongswan govici: unmarshall child SA struct

I'm starting to use the Strongswan govici API to control IPsec, following the general pattern I found at https://github.com/strongswan/govici/blob/master/docs/getting_started.md. It's working except that I'm unable to set a connection's childSA's…
Jeff Learman
  • 2,914
  • 1
  • 22
  • 31
1
vote
0 answers

How to add custom document marshalling strategy to jbpm?

Im using red hat bpm which is built on jbpm and I want to store uploaded attachments to the cloud storage. The problem is that I couldn't find any relevant documentation for doing this. I've read that I need to implement…
1
vote
1 answer

Marshal structure with integer references to C#

Hi I'm trying to create and marshal the following structure from C# into C++ and maintain the linked reference. I'm unsure how this structure should be defined in C#? In C++ the structure must look like below, with the const reference…
Mark
  • 510
  • 1
  • 5
  • 18
1
vote
2 answers

JAX-B is marshalling everything

I have a class with an @XmlRootElement(name="objectName",namespace="https:blahblah") and some attributes in the class all with @XmlElement(namespace="https:blahblah") But now I have some element without an XmlElement annotation. Why is it also…
Franz Kafka
  • 10,623
  • 20
  • 93
  • 149
1
vote
0 answers

Marshalling struct in c# from C++ dll

In C++ I have a struct:- typedef struct { unsigned char ucSpeed; unsigned long ulLength; unsigned char ucBulkInPipe; unsigned char ucBulkOutPipe; unsigned char ucInterruptPipe; }USB_DEVICE_INFO, *PUSB_DEVICE_INFO; In header I…
1
vote
1 answer

How to Marshall a composite key for GetCommand

I have a dynamo table with a partition key of 'shop' and sort key 'item'. I want to use GetItemCommand to find a particular item using this composite key. const params = { TableName: process.env.DYNAMODB_TABLE_NAME, Key: marshall({shop:…
sheffield
  • 11
  • 2
1
vote
2 answers

Effectively convert bytes to array of structures in C#

My C# application interacts with the C application via the "callbacks" mechanism. On the C side I have Point struct: struct Point { float x, y, z; }; To transfer points from C to C# I pass my C# delegate callback function pointsCallback to C…
elo
  • 489
  • 3
  • 13
1 2 3
99
100