Category "serialization"

ModelSerializer field validation for empty string

I'm having a problem with django rest framework. My front is posting data to drf, and one of the fields could be null or an empty string "". # models.py class

Json.NET: how to remove assembly info from types in the resulting json string?

I am serializing using Json.NET, but the resulting string ends up way too long, because it includes a ton of surplus info about the assembly that I have no use

.NET NewtonSoft JSON deserialize map to a different property name

I have following JSON string which is received from an external party. { "team":[ { "v1":"", "attributes":{ "eighty_min_

Reliable way to check if objects is serializable in JavaScript

Is there a known way or a library that already has a helper for assessing whether an object is serializable in JavaScript? I tried the following but it doesn't

Laravel - Attribute casting does not cast serialised value to array

I have a model in which I have the following cast: protected $casts = [ 'formatted_criteria' => 'array' ]; It is stored in the database as a seriali

Serialization without Boost.Serialization

I'm trying to implement a simple serialization/deserialization method for my code to be able to pass an object over the network using MPI. In an ideal world I w

How can I use serialized data in Gutenberg?

I am trying to create a Sidebar plugin that stores post meta to be used on the front end. Without getting into the unnecessary details, I need to store all the

A circular reference has been detected when serializing the object of class "App\Entity\User" (configured limit: 1)

I am faced with a problem that gives me this error: A circular reference has been detected when serializing the object of class "App\Entity\User" (configured l

Deserialization of reference types without parameterless constructor is not supported

I have this API public ActionResult AddDocument([FromBody]AddDocumentRequestModel documentRequestModel) { AddDocumentStatus documentState =

Serializing a class which contains a std::string

I'm not a c++ expert but I've serialized things a couple of times in the past. Unfortunately this time I'm trying to serialize a class which contains an std::st

How do I serialize an object into query-string format?

How do I serialize an object into query-string format? I can't seem to find an answer on google. Thanks. Here is the object I will serialize as an example. pu

How to parse this json result without making class in C#

How can i parse this json without class in c#. I don't know what to use either an array or anything else. This is the json result i want to be parsed { "s

MongoDB BsonDocument - Serialize JSON as key-object

I have a doubt if it is possible to serialize a collection of BsonDocument results as a JSON pair of key objects. For example, I attach a piece of code that cre