Dynamic C# Serialization for JSON Deserialization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems require multiple predefined C# classes for deserializing complex JSON data from different web methods, leading to computationally intensive and time-consuming maintenance and updates.

Innovation Solution

A C# system and method that dynamically serializes and deserializes JSON classes at runtime, generating a dynamic C# class with a target class and method to return data objects, eliminating the need for predefining multiple C# classes by identifying attribute names and creating dynamic classes based on data objects.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If multiple predefined C# classes are created for deserializing JSON data from different web methods, then data deserialization can be performed, but maintenance and updates become computationally intensive and time consuming

Engineering Contradiction:
Improvedata deserialization capabilityVSAvoidmaintenance and update time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies dynamics by generating C# classes dynamically at runtime based on the actual JSON data structure and attribute names returned by web methods, rather than using static predefined classes. This allows the system to adapt to changing data formats automatically, eliminating the need for manual maintenance of multiple class definitions while maintaining reliable deserialization capability

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system performs self-service by automatically generating appropriate C# classes from the JSON data itself during runtime. The web method responses contain the necessary structural information (attribute names and data types), which the system uses to self-generate the required class definitions without external intervention, thereby eliminating maintenance overhead

Inventive Principle:
Principle #25Self-service

2Adaptability or versatility

If multiple definitions of the same C# class are created for deserializing data objects from different web methods, then deserialization can accommodate different attribute names, but the system complexity increases

Engineering Contradiction:
Improvedeserialization adaptability to different web methodsVSAvoidnumber of C# class definitions
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent replaces multiple static class definitions with a single dynamic class generation mechanism. At runtime, the system inspects the JSON data structure and dynamically creates the appropriate C# class definition tailored to each web method's response format, thereby maintaining high adaptability while reducing system complexity from multiple predefined classes to one flexible generation process

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent implements a universal dynamic class generation mechanism that can handle multiple different web method responses through a single process. This multi-functional approach allows the same code to adapt to various attribute names and data structures from different web methods, replacing the need for multiple specialized class definitions

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS10467321B2Systems and methods for dynamic C# serialization
Publication Date: 2019.11.05 MASTERCARD INT INC
  • US10467321B2 patent drawing
  • US10467321B2 patent drawing
  • US10467321B2 patent drawing

AI summary

C Sharp (C#) system including one or more C Sharp (C#) computing devices for dynamically serializing C Sharp (C#) during runtime is provided. The C# system is configured to receive a serialized JSON class including at least one data object associated with at least one attribute name and deserialize the serialized JSON class. The C# system is also configured to serialize a C# class using the deserialized JSON class, and dynamically identify, from the C# class, the at least one data object during the runtime of the data objects. The C# system is further configured to generate a dynamic C# class, wherein the dynamic C# class includes a target class and a method for returning the at least one data object, and return the at least one data object.