static int parsedMapKey(void* ctx, const unsigned char* value,
unsigned length)
{
+ // same thing as a string
return parsedString(ctx, value, length);
}
private:
void init(std::istream& input, bool deleteIn, bool comments, bool check)
{
- const yajl_callbacks callbacks =
+ // this has to be static because yajl actually does not copy it into its
+ // internal data structures but rather keeps a pointer to this
+ static const yajl_callbacks callbacks =
{
deserializer_impl::parsedNull,
deserializer_impl::parsedBoolean,