Top "Marshalling" questions

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

MarshalJSON error , invalid character "g" after top-level

I made a custom type for my IDs: type ID uint func (id ID) MarshalJSON() ([]byte, error) { e, _ := HashIDs.Encode([]…

json go marshalling hashids
Custom MarshalJSON() never gets called in Go

I've written custom versions of MarshalJSON and UnmarshalJSON. My UnmarshalJSON gets called the way I want it to, but I …

json go marshalling
Getting Array of struct from IntPtr

I have some struct like this struct MyStruct { public int field1; public int field2; public int field3; } and I have …

c# arrays marshalling intptr
Marshal.SizeOf throws ArgumentException on enums

Consider this code: public enum MyEnum { V1, V2, V3 } int size = Marshal.SizeOf(typeof(MyEnum)); it throws the exception: An …

c# .net enums marshalling
JAXB XML Adapters work via annotations but not via setAdapter

I understand all about how to use XMLAdapters to convert unmappable types, or just to change how certain objects are …

java xml jaxb marshalling
Marshaling pointer to an array of strings

I am having some trouble marshaling a pointer to an array of strings. It looks harmless like this: typedef struct { …

c# pinvoke unmanaged marshalling
PropertyException when setting Marshaller property with eclipselink.media-type value: application/json

I'm attempting to follow the example located here but get an javax.xml.bind.PropertyException. I receive this exception because …

java jaxb eclipselink marshalling moxy
DllImport and char*

I have a method I want to import from a DLL and it has a signature of: BOOL GetDriveLetter(OUT …

c# .net pinvoke marshalling dllimport
Correct way to marshal SIZE_T*?

I have the following C++ function definition, which I am trying to call through PInvoke from managed code: bool FooBar(…

c# c++ pinvoke marshalling intptr
C# P/Invoke: Marshalling structures containing function pointers

Sorry for the verbose introduction that follows. I need insight from someone knowing P/Invoke internals better than I do. …

c# pinvoke marshalling structure function-pointers