<commit_before>/**
 * TurboCommons is a general purpose and cross-language library that implements frequently used and generic software development tasks.
 *
 * Website : -> http://www.turbocommons.org
 * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
 * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
 * CopyRight : -> Copyright 2015 Edertone Advanded Solutions (08211 Castellar del Vallès, Barcelona). http://www.edertone.com
 */
 

import { NumericUtils } from '../utils/NumericUtils';
import { ValidationManager } from "./ValidationManager";
import { HashMapObject } from '../model/HashMapObject';
import { StringUtils } from '../utils/StringUtils';
import { ArrayUtils } from '../utils/ArrayUtils';
import { ObjectUtils } from '../utils/ObjectUtils';

    
/**
 * Contains methods that allow us to convert data from one complex data structure 
 * format to another complex data structure format
 */  
export class SerializationManager {
    
    
    /**
     * When set to true, the structures that are passed as serialization sources must match the structures 
     * that are passed as serialization targets.
     * TODO - explicar millor aixo: all keys that are defined on the serialization sources must exist on the serialization targets.
     * Otherwise an exception will be thrown
     */
    strictMode = true;
    
    
    /**
     * Generate a valid JSON string from a given class instance
     * 
     * @param classInstance A class instance
     * 
     * @returns A valid JSON string containing all the data on the provided class
     */
    classToJson(classInstance:any){

        return JSON.stringify(classInstance);<commit_msg>TS: Minor doc changes<commit_after>/**
 * TurboCommons is a general purpose and cross-language library that implements frequently used and generic software development tasks.
 *
 * Website : -> http://www.turbocommons.org
 * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
 * License Url : -> http://www.apache.org/licenses/LICENSE-2.0
 * CopyRight : -> Copyright 2015 Edertone Advanded Solutions (08211 <NAME>, Barcelona). http://www.edertone.com
 */
 

import { NumericUtils } from '../utils/NumericUtils';
import { ValidationManager } from "./ValidationManager";
import { HashMapObject } from '../model/HashMapObject';
import { StringUtils } from '../utils/StringUtils';
import { ArrayUtils } from '../utils/ArrayUtils';
import { ObjectUtils } from '../utils/ObjectUtils';

    
/**
 * Contains methods that allow us to convert data from one complex data structure 
 * format to another complex data structure format
 */  
export class SerializationManager {
    
    
    /**
     * When set to true, the structures that are passed as serialization sources must match the structures 
     * that are passed as serialization targets: All keys or properties that are defined on the serialization sources
     * must exist on the serialization targets, otherwise an exception will be thrown
     */
    strictMode = true;
    
    
    /**
     * Generate a valid JSON string from a given class instance
     * 
     * @param classInstance A class instance
     * 
     * @returns A valid JSON string containing all the data on the provided class
     */
    classToJson(classInstance:any){

        return JSON.stringify(classInstance);
{'fraction_non_alphanumeric': 0.08728323699421965, 'fraction_numerical': 0.007514450867052023, 'mean_word_length': 3.241421568627451, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1562355', 'n_tokens_mistral': 873, 'n_tokens_neox': 836, 'n_words': 362}