Petri Lehtinen

Results 108 comments of Petri Lehtinen

I'm not familiar with the memory model of Windows, but I think DLL's have a separate heap from the main program. If that's the case, then the `d` pointer in...

Could it be that Jansson used in the DLL has different hash seed than Jansson used by the main program? That would explain why everything else works but object lookups...

Do you load the DLL dynamically or does the linker do it automatically?

So you'd like to decode the value as a string? Or is the imprecise decimal representation the problem?

Ok. But this decoding flag would give you a string, i.e. "200.123456789", not a special value that's a number but whose contained value is a string. So you would lose...

Adding a precision field to the `json_real_t` struct sounds the best option this far, only used by the decoder and encoder (if set).

Introducing a new type for this use case doesn't sound so good. The ultimately correct fix would be to replace `sprintf("%.17g")` with the algorithm in David Gay's dtoa.c or similar.

Yeah, this is also an option. But allocating the extra memory to store input strings of every number doesn't sound good for people using this on embedded devices. It could...

I'm not against adding a new type if it's not only for working around quirks of floating point formatting. What are the use cases that we're trying to support here?...

Alright, sounds good. Having a JSON_RAW value, how does the user know what it contains (number/string/etc)?