Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8780905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:10:22+00:00 2026-06-13T20:10:22+00:00

In the C API for MsgPack, why are keys (for example the key field

  • 0

In the C API for MsgPack, why are keys (for example the key field of msgpack_object_kv) of type msgpack_object?

https://github.com/msgpack/msgpack-c/blob/master/src/msgpack/object.h

Why aren’t they just msgpack_object_raw? Can they be any type?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:10:23+00:00Added an answer on June 13, 2026 at 8:10 pm

    Can they be any type?

    Yes. And that’s precisely why keys are represented as msgpack_object-s.

    If you look at the maps format specification you can see that maps are defined by N = number of pairs within the map where:

    odd elements are key and next element of the key is its associate value

    So you are free to use whatever kind of object for keys.

    Here’s an example (with a map made of 2 pairs) from test/msgpackc_test.cpp:

    unsigned int map_size = 2;
    /* ... */
    msgpack_pack_map(&pk, map_size);
    msgpack_pack_true(&pk);
    msgpack_pack_false(&pk);
    msgpack_pack_int(&pk, 10);
    msgpack_pack_int(&pk, -10);
    

    As you can see the first key is a MSGPACK_OBJECT_BOOLEAN and the second one is a MSGPACK_OBJECT_POSITIVE_INTEGER.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The ScalaSignature is an annotation. It contains meta informations. https://github.com/scala/scala/blob/v2.9.2/src/library/scala/reflect/ScalaSignature.java And then parser is
POST /api/crmteetimeapi.asmx/Login HTTP/1.1 Host: golffacility.com Content-Type: application/x-www-form-urlencoded Content-Length: length OwnerID=string&UserID=string&Password=string What language do I
API in my example returns id, name pair <categories> <category id=5 name=Bollywood/> <category id=484
http://api.jquery.com/index/ Is there a way to use jQuery index() method to find the index
When I access website API using https, the ASIHTTPRequest can't get response. I got
GitHub API docs says: Git DB API functions will return a 409 if the
Scribd API: http://www.scribd.com/developers For those of you that are aware of Scribd, used it
http://api.jquery.com/select/ mentions that $().select() The select event is sent to an element when the
http://api-public.addthis.com/url/shares.json?url=http://google.com I need to get the number of shares as a php string. (echo)
Does the Swing API have classes which combine InputVerifiers? For example, I have three

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.