I am trying to parse a json i get from external system to salesforce using wrapper class. The class works fine but for test class i am trying to hard code a string to test the class.
Below is the code, I have simplified the json for easier understanding.
String yourFilesContent = '{"MessageHeader":{"Version":"2.0"}}';
String base64Content = ( String ) JSON.deserialize( yourFilesContent, String.class );
Blob body = EncodingUtil.base64Decode(base64Content);
External system writes to file and i read from it and create data in salesforce objects.
When i run this code in developer console i keep getting the error as shown below
Line: 5, Column: 1 System.StringException: Unrecognized base64 character: {
How do i resolve this issue? Any help would be appreciated