marshalling Questions
3
Solved
Is it possible to marshal a struct with method return as field? For example, I want this JSON
{
"cards": [1,2,3],
"value": 6,
"size": 3
}
With this kind of struct
type Deck struct {
Cards [...
Jegger asked 6/8, 2015 at 6:59
2
Solved
I have a yaml file, where one field could be represented by one of possible kinds of structs. To simplify the code and yaml files, let's say I have these yaml files:
kind: "foo"
spec:
fo...
Armhole asked 19/3, 2021 at 14:24
1
Solved
I just encountered with strange behaviour of DllImport in C#, which I can't explain. I want to know how It is possible and where I can read about It. Case is that via DllImport one can call functio...
Chloroform asked 12/3, 2021 at 8:22
2
Solved
How do I create a tf.data.Dataset from tf.keras.preprocessing.image.ImageDataGenerator.flow_from_directory?
I'm considering tf.data.Dataset.from_generator, but it's unclear how to acquire the outp...
Longanimity asked 9/2, 2019 at 12:40
4
Solved
Apparently there's a list of blittable types and so far I don't see Enums specifically on it. Are they blittable in general? Or does it depend on whether they are declared with a blittable base typ...
Ingridingrim asked 7/4, 2011 at 16:11
13
Solved
I know that in terms of several distributed techniques (such as RPC), the term "Marshaling" is used but don't understand how it differs from Serialization. Aren't they both transforming o...
Burrell asked 20/4, 2009 at 23:26
3
Solved
I created those two methods to convert Native utf-8 strings (char*) into managed string and vice versa. The following code does the job:
public IntPtr NativeUtf8FromString(string managedString)
{
...
Tower asked 27/5, 2012 at 11:0
5
Solved
I have JAXB objects created from a schema. While marshalling, the xml elements are getting annotated with ns2. I have tried all the options that exist over the net for this problem, but none of the...
Dandy asked 20/6, 2013 at 20:12
4
Solved
The question title is basically what I'd like to ask:
[MarshalAs(UnmanagedType.LPStr)] - how does this convert utf-8 strings to char* ?
I use the above line when I attempt to communicate between ...
Pareira asked 8/11, 2012 at 12:30
4
Solved
I am wondering if it is possible to have JAXB not to create Java object for XML elements that serve as wrappers. For example, for XML of the following structure
<root>
<wrapper>
<...
Tinny asked 30/6, 2010 at 9:33
4
I'm unsure of the syntax for this. I'm trying to translate this C# code into F#.
struct LASTINPUTINFO
{
public uint cbSize;
public uint dwTime;
}
public class IdleTimer
{
[DllImport("User32.dl...
Delaware asked 6/11, 2009 at 18:35
8
Solved
The question is a bit theoretical, what is the cost of creating JAXB context, marshaller and unmarshaller?
I've found that my code could benefit from keeping the same JAXB context and possibly the...
Gamut asked 13/9, 2011 at 10:33
3
What would be a fast method to copy/convert an array of Color32[] values to a byte[] buffer?
Color32 is a struct from Unity 3D containing 4 bytes, R, G, B and A respectively.
What I'm trying to acc...
Mainsail asked 2/2, 2014 at 15:21
3
Solved
I have something like
@XmlElementWrapper(name="Mylist")
List<Items> myItems = new ArrayList<Items>()
and that comes out like
<Mylist>
<myItems>item 1</myItems>
...
Bask asked 14/10, 2010 at 19:29
6
Has someone ever been able to remove unused namespaces during marshal of an object using JAXB? Here is a link of the requested feature: https://github.com/javaee/jaxb-v2/issues/103 (see description...
Absinthe asked 8/4, 2014 at 15:28
1
I am building an API using flask-restful. I am also using flask-resfulplus for generating swagger documentation. I want to return a dictionary of items where the key is going to vary depending on t...
Cyclonite asked 14/1, 2016 at 18:47
10
Solved
I have heard this concept used frequently, but I don't have a really good grasp of what it is.
Sakti asked 30/9, 2008 at 17:49
4
Solved
I have a method I want to import from a DLL and it has a signature of:
BOOL GetDriveLetter(OUT char* DriveLetter)
I've tried
[DllImport("mydll.dll")]
public static extern bool GetDriveLetter(...
Eduino asked 2/4, 2010 at 18:35
5
Solved
I got the following problem:
My golang program converts some information into JSON.
For example it results in the following json:
{
"value":40,
"unit":"some_string"
}
The problem is the "input...
Polygamy asked 21/9, 2018 at 15:16
2
Solved
I am trying to create and connect to a WLAN profile using Native WiFi (https://managedwifi.codeplex.com/). I am able to view all the Network BSS List and their parameters. However, when I am trying...
Pazpaza asked 21/2, 2017 at 15:47
3
Solved
I'm building a COM object in C# (.Net 4.0) to be used in an classic asp site. Now I'd like to know what's the proper way to marshal VB-Script arrays (single and multidimensional) back and forth bet...
Habergeon asked 22/2, 2011 at 14:11
3
Solved
type TestObject struct {
kind string `json:"kind"`
id string `json:"id, omitempty"`
name string `json:"name"`
email string `json:"email"`
}
func TestCreateSingleItemResponse(t *testing.T) {
t...
Gupton asked 12/10, 2014 at 16:34
1
I'm trying to understand the new C# type Span<T>
When reading the Microsoft's article All About Span: Exploring a New .NET Mainstay I saw at the bottom of the What Is Span<T>? section
...
Draughty asked 3/1, 2020 at 11:2
10
Solved
I've got a few classes that implement Parcelable and some of these classes contain each other as properties. I'm marshalling the classes into a Parcel to pass them between activities. Marshalling t...
Angadresma asked 3/1, 2010 at 21:2
2
I'm trying to integrate with a third-party system and depending on the type of object, the root element of the returned XML document changes. I am using the JAXB library for Marshalling/unmarshalli...
Strainer asked 14/11, 2019 at 6:31
© 2022 - 2024 — McMap. All rights reserved.