title: How to send complex nested Json in body as http post request from Flutter
body: <p>I'm trying to send a nested Json as a body in one of the HTTP post requests from the flutter app I had been working on. This is the JSON body I have to send to the server.</p>
  <pre><code> {
      &quot;title&quot;: &quot;this is my test title&quot;,
      &quot;description&quot;:&quot;this is my test description&quot;,
      &quot;images&quot;:[
          {
              &quot;image&quot;:&quot;mdNBqHlpws+IxE/vUbeQe6E/U+3/v9GNmYqhFaWTKSVDyzoC7fsrDlMSwBAobp73ZUMl5yGcg8Tsqq1CD/j8r5jETCXQii9RVDoJLe80yUk66FYJtyIpxntiSi1qBi8RzThIWklJ2a4QL5+x9x4NOpFbyil/yScTyqSjwTnyL8cA8jOMmxCv/vBSB89nPPyaPZTe66aUZ3Hvr3GQ7AOHvf773X+Nk0PbPzlU1umMTUe7m3Kq2lJHbd0a9Qp4lLOwymvQKKljFKK1EmJL4b/Ayq6Sw62BpPE3I+R0JV5D8qEnUti20zhrw6xEus8A8b2UJMmaL1ev4vhIztq1G/1oS8LLdDq4Gi93VpLkEz62fwswAPFnwbRmcGeKAAAAAElFTkSuQmCC&quot;
          }
           
      ]
  }
  </code></pre>
  <p>I tried many methods that were available online to do it, but every time I'm getting a 500 error. Below is a class to convert it into JSON.</p>
  <pre><code> class PostUpload_Request {
        final String? title;
        final String? description;
        final List&lt;Image&gt;? images;
      
        PostUpload_Request({this.title, this.description, this.images});
      
        factory PostUpload_Request.fromJson(Map&lt;String, dynamic&gt; parsedJson){
      
          return PostUpload_Request(
              title: parsedJson['title'],
              description: parsedJson['description'],
              images: parsedJson['images']
          );
        }
      }
      
      class Image {
        Image({required this.image});
      
        final String? image;
      
        factory Image.fromJson(Map&lt;String, dynamic&gt; parsedJson){
          return Image(
              image:parsedJson['image'],
      
          );
        }
      
      }
  </code></pre>
  <p>I'm a newbie in a flutter. Kindly check my code.</p>