• Manish Gupta 122
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hello All,
I am getting this error "aura_prod.js:850 Uncaught (in promise) Error: closeTab() - Could not close tab."
Please help me to reslove this 
Thanks.
Hi Developers,
I am facing issue when i am passing a json string and it is not getting deserialized as it is considering the whole json string as one value.
Here is my code and json string:
Code:
 public override String abc(){
        Map<String, Object> xyz = (Map<String, Object> )JSON.deserializeUntyped(jsonString);
        Account acc = new Account();
        system.debug('@@@@@'+xyz );
        for (String key : xyz.keySet()){
            String objString = (String)xyz.get(key);
            if( key == 'Account'){
                acc = (Account)JSON.deserialize(objString, Account.class);
            }
        }
jsonString:
'{"Account":"{ "Id ": "001550 ","ShippingStreet ": "abc ", "ShippingState ": "ON ", "ShippingCountry ": "A ", "ShippingCity ": "G ", "Phone ": "123456789 ", "BillingCountry ": "ABC ", "BillingCity ": "G ", "BillingStreet ": "QTR"}"}';
 
Hi Developers,
I am facing issue when i am passing a json string and it is not getting deserialized as it is considering the whole json string as one value.
Here is my code and json string:
Code:
 public override String abc(){
        Map<String, Object> xyz = (Map<String, Object> )JSON.deserializeUntyped(jsonString);
        Account acc = new Account();
        system.debug('@@@@@'+xyz );
        for (String key : xyz.keySet()){
            String objString = (String)xyz.get(key);
            if( key == 'Account'){
                acc = (Account)JSON.deserialize(objString, Account.class);
            }
        }
jsonString:
'{"Account":"{ "Id ": "001550 ","ShippingStreet ": "abc ", "ShippingState ": "ON ", "ShippingCountry ": "A ", "ShippingCity ": "G ", "Phone ": "123456789 ", "BillingCountry ": "ABC ", "BillingCity ": "G ", "BillingStreet ": "QTR"}"}';