# Working with nested JSON Objects in C++

**URL:** <https://forums.unrealengine.com/t/working-with-nested-json-objects-in-c/307912>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [February 24, 2015, 11:11am UTC](https://forums.unrealengine.com/t/working-with-nested-json-objects-in-c/307912 "2015-02-24T11:11:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Norbert\_Ozdoba](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Norbert\_Ozdoba](https://forums.unrealengine.com/u/Norbert_Ozdoba)\
**Post date:** [February 24, 2015, 11:11am UTC](https://forums.unrealengine.com/t/working-with-nested-json-objects-in-c/307912/1 "2015-02-24T11:11:38Z")

</div>

I want to serialize to/deserialize from JSON String to Object.  
Everything was fine until I’ve tried to deserialize/serialize nested object.  
For example if I have:

```
class Foo : public FOnlineJsonSerializable
{
   FString a;
   FString b;

BEGIN_ONLINE_JSON_SERIALIZER
  ONLINE_JSON_SERIALIZE("a", a);
  ONLINE_JSON_SERIALIZE("b", b);
END_ONLINE_JSON_SERIALIZER
};

class Bar : public FOnlineJsonSerializable
{
   FString c;
   Foo d;

BEGIN_ONLINE_JSON_SERIALIZER
  ONLINE_JSON_SERIALIZE("c", c);
  ONLINE_JSON_SERIALIZE_SERIALIZABLE("Foo", d);
END_ONLINE_JSON_SERIALIZER
};

```

It will not see object d during serialization/deserialization. What is proper way to do it ?
