title: Parse - JSON text did not start with array or object
body: <p>I've got this issue when running my code to update a few records. I have 138 records.</p>
  <p>I've set limit to get 1000 record per one request and then I've tried to update my new column I've created:</p>
  <p>But I get this error when I save PFObject in background</p>
  <pre><code>Error Domain=NSCocoaErrorDomain Code=3840 &quot;JSON text did not start with array or object and option to allow fragments not set.&quot; UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.
  </code></pre>
  <p>I found this <a href="https://github.com/parse-community/parse-server/issues/166" rel="nofollow noreferrer">link</a> with similar problem, but looks like that ticket is resolved and closed.</p>
  <p>Looking in my code below I am trying to cycle over 138 records to set new key value for PFObject and then I save it. Normally I don't need such operation, maybe this happens because of lot of records were updated at once. But just wonder if this is still the case in api.</p>
  <p>This is my code:</p>
  <pre><code>let salaryRepository = SalaryDataRepository(remoteDataSource: SalaryRemoteDataSource(), localDataSource: SalaryLocalDataSource())
          
          salaryRepository.getSalaries(with: nil, payPeriod: nil, paidDateDoesNotExist: false, limit: 0, skip: 0, completion: { (result) in
              
              switch result {
              case let .success(salaries):
                  
                  guard let unwrappedSalaries = salaries else {
                      return
                  }
                  
                  var counter = 0
                  
                  for salary in unwrappedSalaries {
                      
                      var totalQuote1 = 0.0
                      
                      if let pfSalary = salary.getPFSalary() {
                          
                          if let subTotal = pfSalary[&quot;subTotal&quot;] as? NSNumber, let unwrappedCustomExchangeRate = pfSalary[&quot;customExchangeRate&quot;] as? NSNumber {
                              
                              if let pfProjectEmployee = pfSalary[&quot;projectEmployee&quot;] as? PFObject {
                                  
                                  if let pfProjectEmployeeDetails = pfProjectEmployee[&quot;projectEmployeeDetails&quot;] as? PFObject {
                                      
                                      if let transactionFee = pfProjectEmployeeDetails[&quot;transactionFee&quot;] as? NSNumber {
                                          
                                          
                                          
                                          let subTotalQuote = NSNumber.getMultiplying(a: subTotal, b: unwrappedCustomExchangeRate)
                                          let totalQuote = subTotalQuote.afterFee(fee: transactionFee)
                                          
                                          pfSalary[&quot;totalQuote&quot;] = totalQuote
                                          
                                          totalQuote1 = totalQuote.doubleValue
                                          
                                          print(transactionFee)
                                          
                                          counter = counter + 1
                                          
                                      }
                                      
                                  }
                                  
                              }
                              
                              
                              pfSalary.saveInBackground { (success, error) in
                                  if error == nil &amp;&amp; success == true {
                                      print(&quot;SUCCESS:&quot;)
                                      print(totalQuote1)
                                  } else {
                                      print(&quot;ERROR:&quot;)
                                      print(totalQuote1)
                                  }
                              }
                          }
                      }
                      
                      
                      
                  }
                  
                  print(&quot;total updated:&quot;)
                  print(counter)
                  
                  break
              case let .failure(error):
                  print(error)
                  break
              }
              
              
          })
  </code></pre>