Web Connection
Serializing a cursor into json string
Gravatar is a globally recognized avatar based on your email address. Serializing a cursor into json string
  Michele
  All
  Apr 7, 2025 @ 03:44am

How serialize a large cursor without having "String too long to fit" error ?

Thanks

Gravatar is a globally recognized avatar based on your email address. re: Serializing a cursor into json string
  Tore Bleken
  Michele
  Apr 7, 2025 @ 04:36am

I have to ask...
What is a "large cursor", I mean how big? How many records, how many fields, total size if you store it as a table?

Gravatar is a globally recognized avatar based on your email address. re: Serializing a cursor into json string
  Michele
  Tore Bleken
  Apr 7, 2025 @ 04:42am

the json file i obtained splitting my queries is 35mb and i ahev 135k records... but this is not my largest file. At the moment is the largest...

Gravatar is a globally recognized avatar based on your email address. re: Serializing a cursor into json string
  Rick Strahl
  Michele
  Apr 7, 2025 @ 09:49am

With the current version it's not possible using wwJsonSerializer.

I took a quick look though, and it's possible to tweak the wwJsonSerializer code a bit to make it work with strings larger than 16mb.

This fix in WriteCursor() works:

Same logic should be applied to the array and collection generators.

It'll be in the next Web Connection update.

+++ Rick ---

© 1996-2025