title: Beautifying string to JSON when there is a JSON payload within a JSON wrapper
body: <p>I have a JSON string that is made up of a JSON wrapper and within this wrapper is JSON payload.</p>
  
  <p>I need to beautify the string so it is more readable.</p>
  
  <p>I have tried using some regular beautifiers (Newtonsoft, plus a nice one I found on SO) however because of the way this JSON  string is given to me they do not work</p>
  
  <p>Here is my JSON string</p>
  
  <p>{
    "LocalReferenceNumber": "DNXLHR1906000000000005",
    "DeclarationStatus": "Submitted",
    "Payload": "{\"DeclarationType\":null,\"AcceptanceDateUtc\":null,\"DeclarationUcr\":\"9GB949032610000-AI-000000031-ASH\",\"LocalReferenceNumber\":\"DNXLHR1906000000000005\",\"TraderReference\":\"AI-000000031-ASH\",\"Exporter\":{\"IdentificationNumber\":null,\"Name\":null,\"Street\":null,\"City\":null,\"PostCode\":null,\"Country\":null},\"Importer\":{\"IdentificationNumber\":null,\"Name\":null,\"Street\":null,\"City\":null,\"PostCode\":null,\"Country\":null},\"Seller\":{\"IdentificationNumber\":null,\"Name\":null,\"Street\":null,\"City\":null,\"PostCode\":null,\"Country\":null},\"Buyer\":{\"IdentificationNumber\":null,\"Name\":null,\"Street\":null,\"City\":null,\"PostCode\":null,\"Country\":null},\"Declarant\":{\"IdentificationNumber\":\"GB949032610000\",\"Name\":\"ASM (UK) LTD\",\"Street\":\"ASHFORD HOUSE\",\"City\":\"ASHFORD\",\"PostCode\":\"TW15 2TQ\",\"Country\":\"GB\"},\"Representative\":{\"IdentificationNumber\":null,\"Name\":null,\"Street\":null,\"City\":null,\"PostCode\":null,\"Country\":null},\"Representation\":0,\"TransportTypeOnArrival\":null,\"TransportIdentityOnArrival\":null,\"BorderTransportMode\":4,\"TransportCountryAtBorder\":null,\"InlandTransportMode\":null,\"TotalPackages\":null,\"DispatchCountry\":null,\"DestinationCountry\":null,\"InvoiceCurrency\":null,\"InvoiceTotal\":null,\"DeliveryTerms\":null,\"ExchangeRate\":null,\"NatureOfTransaction\":null,\"GoodsLocation\":{\"CountryCode\":null,\"Type\":null,\"Quantifier\":null,\"Identification\":null,\"Name\":null},\"FirstDeferment\":null,\"SecondDeferment\":null,\"WarehouseIdentity\":null,\"WarehouseType\":null,\"SupervisingOffice\":null,\"AirportOfLoading\":null,\"MovementReferenceNumber\":null,\"AuthorisationHolders\":[],\"Containers\":[],\"Guarantees\":[],\"AdditionalFiscalReferences\":[],\"AdditionalSupplyChainActors\":[],\"PreviousDocuments\":[{\"Category\":\"Z\",\"Type\":\"DCR\",\"Reference\":\"9GB949032610000-AI-000000031-ASH\",\"Identifier\":null,\"Order\":1}],\"Items\":[{\"ItemNumber\":1,\"DeclarationUcr\":null,\"TraderReference\":null,\"CountryOfOrigin\":null,\"PreferentialCountryOfOrigin\":null,\"Preference\":null,\"Quota\":null,\"GoodsDescription\":\"DSAFASDFSA\",\"ItemPrice\":null,\"ItemCurrency\":null,\"StatisticalValue\":null,\"StatisticalValueCurrency\":null,\"NetMass\":null,\"GrossMass\":null,\"SupplementaryUnits\":null,\"ValuationMethod\":null,\"ValuationIndicators\":null,\"DispatchCountry\":null,\"DestinationCountry\":null,\"NatureOfTransaction\":null,\"Exporter\":{\"IdentificationNumber\":null,\"Name\":null,\"Street\":null,\"City\":null,\"PostCode\":null,\"Country\":null},\"Seller\":{\"IdentificationNumber\":null,\"Name\":null,\"Street\":null,\"City\":null,\"PostCode\":null,\"Country\":null},\"Buyer\":{\"IdentificationNumber\":null,\"Name\":null,\"Street\":null,\"City\":null,\"PostCode\":null,\"Country\":null},\"CustomsUnionAndStatisticsNumber\":null,\"CommodityCode\":null,\"ProcedureCode\":null,\"CommodityAdditionalCodes\":[],\"AdditionalProcedureCodes\":[],\"PreviousDocuments\":[],\"Containers\":[],\"Packages\":[],\"FiscalReferences\":[],\"SupplyChainActors\":[],\"AdditionsAndDeductions\":[],\"AdditionalInformation\":[],\"DocumentCertificateAuthorisationReferences\":[],\"TaxLines\":[]}],\"OtherAdditionsAndDeductions\":[]}",
    "SubmittingBy": "devbuilder",
    "SubmittedOn": "2019-06-14T09:08:42.788Z"
  }</p>
  
  <p>As you can see there is a 'Payload' section that contains JSON data within the 'JSON wrapper' I need to format the whole string so it looks like  formatted JSON data, i.e proper indents and the like.</p>