goertzenator / nifpp

C++11 Wrapper for Erlang NIF API
125 stars 61 forks source link

Question: map of maps #14

Open vasu-dasari opened 3 years ago

vasu-dasari commented 3 years ago

Thanks for you the nifpp project. Quite useful one.

I have a quick question on representing maps of maps. For example if I would like to return this following map to the Erlang from a nif, how could I do that?

    #{
        abc => 1,
        mln => "mln",
        pqr => #{
            a => 1,
            b => 2
        }
    }

Thanks -Vasu

vasu-dasari commented 3 years ago

I realized niffp might need new APIs to accomplish this. So, implemented what I thought might work in they pull-request. Let me know what you think.