Jump to content

Does toJSON have size limit?


xScatta

Recommended Posts

There's nothing in the wiki that says toJSON function has a size limit, so it probably isn't limited. But I'm afraid that big tables can cause a performance hit especially if you're using the function continuously. Why don't you try and tell us the results?

Link to comment
  • Discord Moderators

I think there is no hard limit in what can toJSON return (and if it uses char* strings in its C++ implementation, which is probable, I can tell you that there isn't any limit).

However, keep in mind that RAM, storage and CPU power are limited resources: if your toJSON call produces a 1 GB string, it will take more than 1 GB in RAM to store it, doing any operations with it will take time and saving it to a database may be impossible or be impractical, depending of the limits of the DB software you are using. When working with large amounts of data the optimal thing to do is dividing it in smaller cunks which can be stored and processed without any problem.

Link to comment

What Alex said is true, as I told you there's no limit for JSON at all, but if you stored into it a large amount of data, to be saved into your database for example it will take more RAM memories to be handled, and still JavaScript Object Notation ( JSON ) has no limit specified, it's up to your server RAM too.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...