As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [deserialize]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
1 vote
1 answer

How to deserialize json string to Apex

I have a requirement, where I have to select some value from multipicklist and then send this json response to the server. There are 2 scenarios: 1st Scenario: when we are selecting and de-...
Noob_NoVoice's user avatar
  • 2,699
2 votes
1 answer

deserializing JSON returns a null object

I'm trying to deserialize a JSON response into a list, so that eventually I can iterate through the list and create new contacts from the response. This is my first time working with APIs and JSON, ...
mikesalty's user avatar
  • 209
-2 votes
1 answer

why we need to serialize and deserialize

why we need to serialize and deserialize? Why don't we save the value directly into database with out serialize. What is the benefit for doing serialize. I know that by doing serialize it will get ...
Anu's user avatar
  • 3,773
4 votes
1 answer

JSON.deserializeUntyped returns "unrecognized token: 'NULL'", when JSON token has a null value

We're creating our JSON responses to my salesforce callouts in house, so I'm guessing the issue has to do with how we're representing NULL in the JSON response. Here's a snippet of the response SF ...
smohyee's user avatar
  • 3,672
1 vote
1 answer

JSON.deserialize not ignoring unknown properties.

I'm trying to deserialize a JSON response from an API. Let's say the JSON looks like this: { "pages": 3, "this_page": 1, "products": [ { "id": "1", "...
jonathanwiesel's user avatar
1 vote
1 answer

JSON Deserialize Byte Array

I'm porting over a rest client from .NET to Apex and in the class that gets initiated by deserializing the JSON response, there is a byte[]. C# Example: public class MyResponse { public ...
NSjonas's user avatar
  • 9,885
1 vote
1 answer

Access date time in milliseconds from nested soql query

This SOQL statement SELECT name, (SELECT From__c, To__c FROM Trip__r) FROM Account limit 1 will return Smith [{"From__c":"2013-11-25T15:15:00.000+0000","To__c":"2013-11-27T15:15:00.000+0000"},{"...
dzh's user avatar
  • 4,206
9 votes
1 answer

APEX ENUM Serialize to and Deserialize from JSON

I have APEX classes defined with enum properties that are to be serialized into JSON. Also, I am reading in JSON and deserializing them back to my defined classes. To make the enum properties work ...
Joe's user avatar
  • 93
2 votes
1 answer

How to do a DML upsert/insert loop in custom object after JSON deserialization?

I'm fairly new to Apex and I am completely at a loss at what to do next. So far I was able to grab and deserialize my JSON I grabbed from a Web Service(This does a GET Method for info for salespeople)....
Jason J's user avatar
  • 107
8 votes
1 answer

How to serialize an object as JSON?

I have an object that's pretty extensive (lots of properties and child relationships). I'd like to serialize it. So I am doing the following: Proposal__c proposal = (Proposal__c) getRecord(); ...
AngryHacker's user avatar
  • 1,481
4 votes
3 answers

Deserialising a DateString

I do: Date d = (Date)JSON.deserialize('2013-06-07T00:00:00.000Z', Date.class); System.debug('**********d = ' + d); I expect: *************d = 2013-06-07 00:00:00 I see: *************d = 2013-01-...
More Than Five's user avatar
10 votes
4 answers

how to parse the JSON object in salesforce

how to parse the json string . here multiple contact,multiple postalcode and mulitple contactnumber .how can i get the values from this json list of contacts,list of postalcode and list of ...
Kittu's user avatar
  • 113

1 2 3 4