Comments (5)
Looks nice. Patches welcome!
from msgpack-perl.
Iโm working on a module to support WAMP, a messaging/RPC protocol. That protocol supports MessagePack, but itโs a bit clumsy to implement because D::MP only uses its own boolean objects.
Can you point me in the appropriate direction for accessing and testing equality of a Perl global from XS? I may try to find time to work on this.
from msgpack-perl.
Ah, I am stuck with this one as well -- JSON->Perl data->MP -- fails.
Looks like a MR has already been submitted to address this -- #37.
Is there anything I can help with to have the fix merged into the module?
Thanks in advance!
from msgpack-perl.
Something in production broke because of this issue, so I had to come up with a workaround. Sharing it here so it helps others who may be looking for one:
- If your input has blessed booleans, store them as \1 or \0. In my case, I am dealing with TOML files, so something like:
my $parser = TOML::Parser->new(
inflate_boolean => sub {
my $boolean = shift;
return $boolean eq 'true' ? \1 : \0;
}
);
- Data::MessagePack stores the data as Data::MessagePack::Boolean blessed objects
- Once you unpack the data, do an
unbless
(from Data::Structure::Util)
That should do the trick until the Data::MessagePack deals with Types::Serialiser::Boolean blessed objects.
from msgpack-perl.
@foobargeez Iโm not sure why my PR is closed, but it expands compatibility to Types::Serialiser while maintaining compatibility with the proprietary flags.
This module appears to be abandoned, though. I tried to contact the maintainer several times and got no response.
from msgpack-perl.
Related Issues (20)
- Cannot communicate with a Haskell based MsgPack RPC server HOT 5
- Invalid type 'Q' in pack at <...> HOT 9
- Minimal Perl version supported HOT 10
- failed test with perl5.19.1? HOT 6
- unpack with "extra bytes" HOT 2
- Problem parsing incoming data from Metasploit HOT 20
- Test failing on Mac with perl 5.22.0 HOT 10
- MessagePack working in a weird way. HOT 5
- No msgpack in alpine HOT 6
- New Str encoding broke compatibility with 0.49 decoding HOT 5
- Support IEEE 754 HOT 3
- Potential issue in casting numbers HOT 2
- Fails Makefile.PL with no '.' in @INC HOT 1
- Should prefer IV when both IV and NV are OK HOT 1
- Can't install under strawberry perl 5.30.0 HOT 3
- Hook for blessed variables HOT 1
- FAIL under -Dusequadmath HOT 1
- Deserialization Error with MessagePack JavaScript Libraries HOT 4
- trying to unpack MessagePack from C failing with "extra bytes (length should be 145)" message HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msgpack-perl.