├── .editorconfig ├── .gitignore ├── DataConfig ├── .clang-tidy ├── .gitignore ├── Content │ └── DcFixture │ │ ├── DcTestBlueprintClassAlpha.uasset │ │ ├── DcTestBlueprintClassBeta.uasset │ │ ├── DcTestBlueprintEnum.uasset │ │ ├── DcTestBlueprintInstanceAlpha.uasset │ │ ├── DcTestBlueprintInstanceBeta.uasset │ │ ├── DcTestBlueprintStructWithColor.uasset │ │ ├── DcTestGameplayAbilityAlpha.uasset │ │ ├── DcTestGameplayEffectAlpha.uasset │ │ └── DcTestNativeDataAssetAlpha.uasset ├── DataConfig.uplugin ├── DataConfig4.uplugin ├── DataConfig54.uplugin ├── Source │ ├── DataConfigCore │ │ ├── DataConfigCore.Build.cs │ │ ├── Private │ │ │ └── DataConfig │ │ │ │ ├── Automation │ │ │ │ ├── DcAutomation.cpp │ │ │ │ └── DcAutomationUtils.cpp │ │ │ │ ├── DataConfigCore.natvis │ │ │ │ ├── DcCorePrivate.cpp │ │ │ │ ├── DcCorePrivate.h │ │ │ │ ├── DcEnv.cpp │ │ │ │ ├── DcTypes.cpp │ │ │ │ ├── Deserialize │ │ │ │ ├── DcDeserializeTypes.cpp │ │ │ │ ├── DcDeserializeUtils.cpp │ │ │ │ ├── DcDeserializer.cpp │ │ │ │ ├── DcDeserializerSetup.cpp │ │ │ │ └── Handlers │ │ │ │ │ ├── Common │ │ │ │ │ ├── DcCommonDeserializers.cpp │ │ │ │ │ ├── DcCoreTypesDeserializers.cpp │ │ │ │ │ └── DcObjectDeserializers.cpp │ │ │ │ │ ├── MsgPack │ │ │ │ │ ├── DcMsgPackCommonDeserializers.cpp │ │ │ │ │ └── DcMsgPackTransientDeserializers.cpp │ │ │ │ │ └── Property │ │ │ │ │ └── DcPropertyPipeDeserializers.cpp │ │ │ │ ├── Diagnostic │ │ │ │ ├── DcDiagnostic.cpp │ │ │ │ ├── DcDiagnosticCommon.cpp │ │ │ │ ├── DcDiagnosticJSON.cpp │ │ │ │ ├── DcDiagnosticMsgPack.cpp │ │ │ │ ├── DcDiagnosticReadWrite.cpp │ │ │ │ ├── DcDiagnosticSerDe.cpp │ │ │ │ └── DcDiagnosticUtils.cpp │ │ │ │ ├── Json │ │ │ │ ├── DcJsonReader.cpp │ │ │ │ └── DcJsonWriter.cpp │ │ │ │ ├── Misc │ │ │ │ └── DcPipeVisitor.cpp │ │ │ │ ├── MsgPack │ │ │ │ ├── DcMsgPackCommon.cpp │ │ │ │ ├── DcMsgPackCommon.h │ │ │ │ ├── DcMsgPackReader.cpp │ │ │ │ ├── DcMsgPackUtils.cpp │ │ │ │ └── DcMsgPackWriter.cpp │ │ │ │ ├── Property │ │ │ │ ├── DcPropertyDatum.cpp │ │ │ │ ├── DcPropertyReadStates.cpp │ │ │ │ ├── DcPropertyReadStates.h │ │ │ │ ├── DcPropertyReader.cpp │ │ │ │ ├── DcPropertyStatesCommon.cpp │ │ │ │ ├── DcPropertyStatesCommon.h │ │ │ │ ├── DcPropertyTypes.cpp │ │ │ │ ├── DcPropertyUtils.cpp │ │ │ │ ├── DcPropertyWriteStates.cpp │ │ │ │ ├── DcPropertyWriteStates.h │ │ │ │ └── DcPropertyWriter.cpp │ │ │ │ ├── Reader │ │ │ │ ├── DcPutbackReader.cpp │ │ │ │ └── DcReader.cpp │ │ │ │ ├── SerDe │ │ │ │ └── DcSerDeUtils.cpp │ │ │ │ ├── Serialize │ │ │ │ ├── DcSerializeTypes.cpp │ │ │ │ ├── DcSerializeUtils.cpp │ │ │ │ ├── DcSerializer.cpp │ │ │ │ ├── DcSerializerSetup.cpp │ │ │ │ └── Handlers │ │ │ │ │ ├── Common │ │ │ │ │ ├── DcCommonSerializers.cpp │ │ │ │ │ ├── DcCoreTypesSerializers.cpp │ │ │ │ │ └── DcObjectSerializers.cpp │ │ │ │ │ ├── MsgPack │ │ │ │ │ ├── DcMsgPackCommonSerializers.cpp │ │ │ │ │ └── DcMsgPackTransientSerializers.cpp │ │ │ │ │ └── Property │ │ │ │ │ └── DcPropertyPipeSerializers.cpp │ │ │ │ ├── Source │ │ │ │ ├── DcHighlightFormatter.cpp │ │ │ │ ├── DcSourceTypes.cpp │ │ │ │ └── DcSourceUtils.cpp │ │ │ │ └── Writer │ │ │ │ ├── DcNoopWriter.cpp │ │ │ │ ├── DcPrettyPrintWriter.cpp │ │ │ │ ├── DcPutbackWriter.cpp │ │ │ │ ├── DcWeakCompositeWriter.cpp │ │ │ │ └── DcWriter.cpp │ │ └── Public │ │ │ └── DataConfig │ │ │ ├── Automation │ │ │ ├── DcAutomation.h │ │ │ └── DcAutomationUtils.h │ │ │ ├── DcEnv.h │ │ │ ├── DcMacros.h │ │ │ ├── DcTypes.h │ │ │ ├── DcVersion.h │ │ │ ├── Deserialize │ │ │ ├── DcDeserializeTypes.h │ │ │ ├── DcDeserializeUtils.h │ │ │ ├── DcDeserializer.h │ │ │ ├── DcDeserializerSetup.h │ │ │ └── Handlers │ │ │ │ ├── Common │ │ │ │ ├── DcCommonDeserializers.h │ │ │ │ ├── DcCoreTypesDeserializers.h │ │ │ │ └── DcObjectDeserializers.h │ │ │ │ ├── MsgPack │ │ │ │ ├── DcMsgPackCommonDeserializers.h │ │ │ │ └── DcMsgPackTransientDeserializers.h │ │ │ │ └── Property │ │ │ │ └── DcPropertyPipeDeserializers.h │ │ │ ├── Diagnostic │ │ │ ├── DcDiagnostic.h │ │ │ ├── DcDiagnosticCommon.h │ │ │ ├── DcDiagnosticJSON.h │ │ │ ├── DcDiagnosticMsgPack.h │ │ │ ├── DcDiagnosticReadWrite.h │ │ │ ├── DcDiagnosticSerDe.h │ │ │ └── DcDiagnosticUtils.h │ │ │ ├── Json │ │ │ ├── DcJsonReader.h │ │ │ └── DcJsonWriter.h │ │ │ ├── Misc │ │ │ ├── DcDataVariant.h │ │ │ ├── DcPipeVisitor.h │ │ │ ├── DcTemplateUtils.h │ │ │ └── DcTypeUtils.h │ │ │ ├── MsgPack │ │ │ ├── DcMsgPackReader.h │ │ │ ├── DcMsgPackUtils.h │ │ │ └── DcMsgPackWriter.h │ │ │ ├── Property │ │ │ ├── DcPropertyDatum.h │ │ │ ├── DcPropertyReader.h │ │ │ ├── DcPropertyTypes.h │ │ │ ├── DcPropertyUtils.h │ │ │ └── DcPropertyWriter.h │ │ │ ├── Reader │ │ │ ├── DcPutbackReader.h │ │ │ ├── DcReader.h │ │ │ └── DcReader.inl │ │ │ ├── SerDe │ │ │ ├── DcDeserializeCommon.inl │ │ │ ├── DcSerDeCommon.h │ │ │ ├── DcSerDeCommon.inl │ │ │ ├── DcSerDeCoreTypesCommon.h │ │ │ ├── DcSerDeUtils.h │ │ │ ├── DcSerDeUtils.inl │ │ │ └── DcSerializeCommon.inl │ │ │ ├── Serialize │ │ │ ├── DcSerializeTypes.h │ │ │ ├── DcSerializeUtils.h │ │ │ ├── DcSerializer.h │ │ │ ├── DcSerializerSetup.h │ │ │ └── Handlers │ │ │ │ ├── Common │ │ │ │ ├── DcCommonSerializers.h │ │ │ │ ├── DcCoreTypesSerializers.h │ │ │ │ └── DcObjectSerializers.h │ │ │ │ ├── MsgPack │ │ │ │ ├── DcMsgPackCommonSerializers.h │ │ │ │ └── DcMsgPackTransientSerializers.h │ │ │ │ └── Property │ │ │ │ └── DcPropertyPipeSerializers.h │ │ │ ├── Source │ │ │ ├── DcHighlightFormatter.h │ │ │ ├── DcSourceTypes.h │ │ │ ├── DcSourceTypes.inl │ │ │ └── DcSourceUtils.h │ │ │ └── Writer │ │ │ ├── DcNoopWriter.h │ │ │ ├── DcPrettyPrintWriter.h │ │ │ ├── DcPutbackWriter.h │ │ │ ├── DcWeakCompositeWriter.h │ │ │ ├── DcWriter.h │ │ │ └── DcWriter.inl │ ├── DataConfigEditorExtra │ │ ├── DataConfigEditorExtra.Build.cs │ │ ├── Private │ │ │ ├── DataConfig │ │ │ │ └── EditorExtra │ │ │ │ │ ├── Deserialize │ │ │ │ │ └── DcDeserializeGameplayAbility.cpp │ │ │ │ │ ├── Diagnostic │ │ │ │ │ └── DcDiagnosticEditorExtra.cpp │ │ │ │ │ ├── Editor │ │ │ │ │ └── DcEditorDumpAssetToLog.cpp │ │ │ │ │ └── Tests │ │ │ │ │ ├── DcCoreTestsCommandlet.cpp │ │ │ │ │ ├── DcTestDeserializeEditor.cpp │ │ │ │ │ ├── DcTestSerDeEditor.h │ │ │ │ │ └── DcTestSerializeEditor.cpp │ │ │ └── DcEditorExtraModule.cpp │ │ └── Public │ │ │ ├── DataConfig │ │ │ └── EditorExtra │ │ │ │ ├── Deserialize │ │ │ │ └── DcDeserializeGameplayAbility.h │ │ │ │ ├── Diagnostic │ │ │ │ └── DcDiagnosticEditorExtra.h │ │ │ │ ├── Editor │ │ │ │ └── DcEditorDumpAssetToLog.h │ │ │ │ └── Tests │ │ │ │ └── DcCoreTestsCommandlet.h │ │ │ └── DcEditorExtraModule.h │ ├── DataConfigEngineExtra │ │ ├── DataConfigEngineExtra.Build.cs │ │ ├── Private │ │ │ ├── DataConfig │ │ │ │ └── EngineExtra │ │ │ │ │ ├── Diagnostic │ │ │ │ │ └── DcDiagnosticEngineExtra.cpp │ │ │ │ │ └── SerDe │ │ │ │ │ ├── DcJsonBlueprintLibrary.cpp │ │ │ │ │ ├── DcSerDeBlueprint.cpp │ │ │ │ │ └── DcSerDeGameplayTags.cpp │ │ │ └── DcEngineExtraModule.cpp │ │ └── Public │ │ │ ├── DataConfig │ │ │ └── EngineExtra │ │ │ │ ├── Diagnostic │ │ │ │ └── DcDiagnosticEngineExtra.h │ │ │ │ ├── SerDe │ │ │ │ ├── DcJsonBlueprintLibrary.h │ │ │ │ ├── DcSerDeBlueprint.h │ │ │ │ └── DcSerDeGameplayTags.h │ │ │ │ └── Types │ │ │ │ └── DcEngineExtraTestFixtures.h │ │ │ └── DcEngineExtraModule.h │ ├── DataConfigEngineExtra5 │ │ ├── DataConfigEngineExtra5.Build.cs │ │ ├── Private │ │ │ ├── DataConfig │ │ │ │ └── EngineExtra │ │ │ │ │ └── SerDe │ │ │ │ │ └── DcSerDeInstancedStruct.cpp │ │ │ └── DcEngineExtra5Module.cpp │ │ └── Public │ │ │ ├── DataConfig │ │ │ └── EngineExtra │ │ │ │ └── SerDe │ │ │ │ └── DcSerDeInstancedStruct.h │ │ │ └── DcEngineExtra5Module.h │ ├── DataConfigExtra │ │ ├── DataConfigExtra.Build.cs │ │ ├── Private │ │ │ └── DataConfig │ │ │ │ └── Extra │ │ │ │ ├── Benchmark │ │ │ │ ├── DcBenchmarkFixture1.cpp │ │ │ │ └── DcBenchmarkFixture1.h │ │ │ │ ├── DcExtraModule.cpp │ │ │ │ ├── Deserialize │ │ │ │ └── DcDeserializeRenameStructFieldNames.cpp │ │ │ │ ├── Diagnostic │ │ │ │ └── DcDiagnosticExtra.cpp │ │ │ │ ├── Misc │ │ │ │ ├── DcBench.cpp │ │ │ │ ├── DcNDJSON.cpp │ │ │ │ ├── DcSqlite.cpp │ │ │ │ └── DcTestCommon.cpp │ │ │ │ ├── SerDe │ │ │ │ ├── DcSerDeAnyStruct.cpp │ │ │ │ ├── DcSerDeBase64.cpp │ │ │ │ ├── DcSerDeColor.cpp │ │ │ │ ├── DcSerDeInlineStruct.cpp │ │ │ │ ├── DcSerDeNested.cpp │ │ │ │ └── DcSerDeRoot.cpp │ │ │ │ └── Types │ │ │ │ ├── DcAnyStruct.cpp │ │ │ │ ├── DcExtraTestFixtures.cpp │ │ │ │ ├── DcInlineStruct.cpp │ │ │ │ ├── DcJsonConverter.cpp │ │ │ │ └── DcPropertyPathAccess.cpp │ │ └── Public │ │ │ └── DataConfig │ │ │ └── Extra │ │ │ ├── DcExtraCommon.h │ │ │ ├── Deserialize │ │ │ └── DcDeserializeRenameStructFieldNames.h │ │ │ ├── Diagnostic │ │ │ └── DcDiagnosticExtra.h │ │ │ ├── Misc │ │ │ ├── DcBench.h │ │ │ ├── DcNDJSON.h │ │ │ ├── DcSqlite.h │ │ │ └── DcTestCommon.h │ │ │ ├── SerDe │ │ │ ├── DcSerDeAnyStruct.h │ │ │ ├── DcSerDeBase64.h │ │ │ ├── DcSerDeColor.h │ │ │ ├── DcSerDeInlineStruct.h │ │ │ ├── DcSerDeNested.h │ │ │ └── DcSerDeRoot.h │ │ │ └── Types │ │ │ ├── DcAnyStruct.h │ │ │ ├── DcExtraTestFixtures.h │ │ │ ├── DcInlineStruct.h │ │ │ ├── DcJsonConverter.h │ │ │ └── DcPropertyPathAccess.h │ ├── DataConfigHeadless.Target.cs │ ├── DataConfigHeadless │ │ ├── DataConfigHeadless.Build.cs │ │ └── DataConfigHeadlessMain.cpp │ ├── DataConfigTests │ │ ├── DataConfigTests.Build.cs │ │ └── Private │ │ │ ├── DcTestBlurb.cpp │ │ │ ├── DcTestBlurb.h │ │ │ ├── DcTestBlurb2.cpp │ │ │ ├── DcTestBlurb2.h │ │ │ ├── DcTestDeserialize.cpp │ │ │ ├── DcTestDiagnostic.cpp │ │ │ ├── DcTestJSON.cpp │ │ │ ├── DcTestJSON2.cpp │ │ │ ├── DcTestMsgPack.cpp │ │ │ ├── DcTestMsgPack.h │ │ │ ├── DcTestProperty.cpp │ │ │ ├── DcTestProperty.h │ │ │ ├── DcTestProperty2.cpp │ │ │ ├── DcTestProperty2.h │ │ │ ├── DcTestProperty3.cpp │ │ │ ├── DcTestProperty3.h │ │ │ ├── DcTestProperty4.cpp │ │ │ ├── DcTestProperty4.h │ │ │ ├── DcTestProperty5.cpp │ │ │ ├── DcTestProperty5.h │ │ │ ├── DcTestReader.cpp │ │ │ ├── DcTestRoundtrip.cpp │ │ │ ├── DcTestRoundtrip.h │ │ │ ├── DcTestRoundtrip2.cpp │ │ │ ├── DcTestSerDe.cpp │ │ │ ├── DcTestSerDe.h │ │ │ ├── DcTestSerialize.cpp │ │ │ ├── DcTestSerialize2.cpp │ │ │ ├── DcTestUtils.cpp │ │ │ ├── DcTestWriter.cpp │ │ │ ├── DcTestsModule.cpp │ │ │ └── IDcTestInterface.h │ ├── DataConfigTests5 │ │ ├── DataConfigTests5.Build.cs │ │ └── Private │ │ │ ├── DcTestUE5.cpp │ │ │ ├── DcTestUE5.h │ │ │ └── DcTests5Module.cpp │ └── DataConfigTests54 │ │ ├── DataConfigTests54.Build.cs │ │ └── Private │ │ ├── DcTestUE54.cpp │ │ ├── DcTestUE54.h │ │ └── DcTests54Module.cpp └── Tests │ ├── DcJSONFixtures │ ├── n_array_double_array_no_comma.json │ └── y_non_ascii_polish.json │ ├── Fixture_AbilityAlpha.json │ ├── Fixture_EffectAlpha.json │ ├── Fixture_UTF8Roundtrip.json │ ├── JSONTestSuiteParsing │ ├── _README.md │ ├── i_number_double_huge_neg_exp.json │ ├── i_number_huge_exp.json │ ├── i_number_neg_int_huge_exp.json │ ├── i_number_pos_double_huge_exp.json │ ├── i_number_real_neg_overflow.json │ ├── i_number_real_pos_overflow.json │ ├── i_number_real_underflow.json │ ├── i_number_too_big_neg_int.json │ ├── i_number_too_big_pos_int.json │ ├── i_number_very_big_negative_int.json │ ├── i_object_key_lone_2nd_surrogate.json │ ├── i_string_1st_surrogate_but_2nd_missing.json │ ├── i_string_1st_valid_surrogate_2nd_invalid.json │ ├── i_string_UTF-16LE_with_BOM.json │ ├── i_string_UTF-8_invalid_sequence.json │ ├── i_string_UTF8_surrogate_U+D800.json │ ├── i_string_incomplete_surrogate_and_escape_valid.json │ ├── i_string_incomplete_surrogate_pair.json │ ├── i_string_incomplete_surrogates_escape_valid.json │ ├── i_string_invalid_lonely_surrogate.json │ ├── i_string_invalid_surrogate.json │ ├── i_string_invalid_utf-8.json │ ├── i_string_inverted_surrogates_U+1D11E.json │ ├── i_string_iso_latin_1.json │ ├── i_string_lone_second_surrogate.json │ ├── i_string_lone_utf8_continuation_byte.json │ ├── i_string_not_in_unicode_range.json │ ├── i_string_overlong_sequence_2_bytes.json │ ├── i_string_overlong_sequence_6_bytes.json │ ├── i_string_overlong_sequence_6_bytes_null.json │ ├── i_string_truncated-utf-8.json │ ├── i_string_utf16BE_no_BOM.json │ ├── i_string_utf16LE_no_BOM.json │ ├── i_structure_500_nested_arrays.json │ ├── i_structure_UTF-8_BOM_empty_object.json │ ├── n_array_1_true_without_comma.json │ ├── n_array_a_invalid_utf8.json │ ├── n_array_colon_instead_of_comma.json │ ├── n_array_comma_after_close.json │ ├── n_array_comma_and_number.json │ ├── n_array_double_comma.json │ ├── n_array_double_extra_comma.json │ ├── n_array_extra_close.json │ ├── n_array_extra_comma.json.skip │ ├── n_array_incomplete.json │ ├── n_array_incomplete_invalid_value.json │ ├── n_array_inner_array_no_comma.json │ ├── n_array_invalid_utf8.json │ ├── n_array_items_separated_by_semicolon.json │ ├── n_array_just_comma.json │ ├── n_array_just_minus.json │ ├── n_array_missing_value.json │ ├── n_array_newlines_unclosed.json │ ├── n_array_number_and_comma.json.skip │ ├── n_array_number_and_several_commas.json │ ├── n_array_spaces_vertical_tab_formfeed.json │ ├── n_array_star_inside.json │ ├── n_array_unclosed.json │ ├── n_array_unclosed_trailing_comma.json │ ├── n_array_unclosed_with_new_lines.json │ ├── n_array_unclosed_with_object_inside.json │ ├── n_incomplete_false.json │ ├── n_incomplete_null.json │ ├── n_incomplete_true.json │ ├── n_multidigit_number_then_00.json.skip │ ├── n_number_++.json │ ├── n_number_+1.json │ ├── n_number_+Inf.json │ ├── n_number_-01.json │ ├── n_number_-1.0..json │ ├── n_number_-2..json │ ├── n_number_-NaN.json │ ├── n_number_.-1.json │ ├── n_number_.2e-3.json │ ├── n_number_0.1.2.json │ ├── n_number_0.3e+.json │ ├── n_number_0.3e.json │ ├── n_number_0.e1.json │ ├── n_number_0_capital_E+.json │ ├── n_number_0_capital_E.json │ ├── n_number_0e+.json │ ├── n_number_0e.json │ ├── n_number_1.0e+.json │ ├── n_number_1.0e-.json │ ├── n_number_1.0e.json │ ├── n_number_1_000.json │ ├── n_number_1eE2.json │ ├── n_number_2.e+3.json │ ├── n_number_2.e-3.json │ ├── n_number_2.e3.json │ ├── n_number_9.e+.json │ ├── n_number_Inf.json │ ├── n_number_NaN.json │ ├── n_number_U+FF11_fullwidth_digit_one.json │ ├── n_number_expression.json │ ├── n_number_hex_1_digit.json │ ├── n_number_hex_2_digits.json │ ├── n_number_infinity.json │ ├── n_number_invalid+-.json │ ├── n_number_invalid-negative-real.json │ ├── n_number_invalid-utf-8-in-bigger-int.json │ ├── n_number_invalid-utf-8-in-exponent.json │ ├── n_number_invalid-utf-8-in-int.json │ ├── n_number_minus_infinity.json │ ├── n_number_minus_sign_with_trailing_garbage.json │ ├── n_number_minus_space_1.json │ ├── n_number_neg_int_starting_with_zero.json │ ├── n_number_neg_real_without_int_part.json │ ├── n_number_neg_with_garbage_at_end.json │ ├── n_number_real_garbage_after_e.json │ ├── n_number_real_with_invalid_utf8_after_e.json │ ├── n_number_real_without_fractional_part.json │ ├── n_number_starting_with_dot.json │ ├── n_number_with_alpha.json │ ├── n_number_with_alpha_char.json │ ├── n_number_with_leading_zero.json │ ├── n_object_bad_value.json │ ├── n_object_bracket_key.json │ ├── n_object_comma_instead_of_colon.json │ ├── n_object_double_colon.json │ ├── n_object_emoji.json │ ├── n_object_garbage_at_end.json │ ├── n_object_key_with_single_quotes.json │ ├── n_object_lone_continuation_byte_in_key_and_trailing_comma.json.skip │ ├── n_object_missing_colon.json │ ├── n_object_missing_key.json │ ├── n_object_missing_semicolon.json │ ├── n_object_missing_value.json │ ├── n_object_no-colon.json │ ├── n_object_non_string_key.json │ ├── n_object_non_string_key_but_huge_number_instead.json │ ├── n_object_repeated_null_null.json │ ├── n_object_several_trailing_commas.json │ ├── n_object_single_quote.json │ ├── n_object_trailing_comma.json.skip │ ├── n_object_trailing_comment.json.skip │ ├── n_object_trailing_comment_open.json │ ├── n_object_trailing_comment_slash_open.json.skip │ ├── n_object_trailing_comment_slash_open_incomplete.json │ ├── n_object_two_commas_in_a_row.json │ ├── n_object_unquoted_key.json │ ├── n_object_unterminated-value.json │ ├── n_object_with_single_string.json │ ├── n_object_with_trailing_garbage.json │ ├── n_single_space.json.skip │ ├── n_string_1_surrogate_then_escape.json │ ├── n_string_1_surrogate_then_escape_u.json.skip │ ├── n_string_1_surrogate_then_escape_u1.json.skip │ ├── n_string_1_surrogate_then_escape_u1x.json.skip │ ├── n_string_accentuated_char_no_quotes.json │ ├── n_string_backslash_00.json │ ├── n_string_escape_x.json.skip │ ├── n_string_escaped_backslash_bad.json │ ├── n_string_escaped_ctrl_char_tab.json │ ├── n_string_escaped_emoji.json.skip │ ├── n_string_incomplete_escape.json │ ├── n_string_incomplete_escaped_character.json.skip │ ├── n_string_incomplete_surrogate.json.skip │ ├── n_string_incomplete_surrogate_escape_invalid.json.skip │ ├── n_string_invalid-utf-8-in-escape.json.skip │ ├── n_string_invalid_backslash_esc.json.skip │ ├── n_string_invalid_unicode_escape.json.skip │ ├── n_string_invalid_utf8_after_escape.json.skip │ ├── n_string_leading_uescaped_thinspace.json │ ├── n_string_no_quotes_with_bad_escape.json │ ├── n_string_single_doublequote.json │ ├── n_string_single_quote.json │ ├── n_string_single_string_no_double_quotes.json │ ├── n_string_start_escape_unclosed.json │ ├── n_string_unescaped_ctrl_char.json │ ├── n_string_unescaped_newline.json │ ├── n_string_unescaped_tab.json │ ├── n_string_unicode_CapitalU.json.skip │ ├── n_string_with_trailing_garbage.json │ ├── n_structure_100000_opening_arrays.json │ ├── n_structure_U+2060_word_joined.json │ ├── n_structure_UTF8_BOM_no_data.json.skip │ ├── n_structure_angle_bracket_..json │ ├── n_structure_angle_bracket_null.json │ ├── n_structure_array_trailing_garbage.json │ ├── n_structure_array_with_extra_array_close.json │ ├── n_structure_array_with_unclosed_string.json │ ├── n_structure_ascii-unicode-identifier.json │ ├── n_structure_capitalized_True.json │ ├── n_structure_close_unopened_array.json │ ├── n_structure_comma_instead_of_closing_brace.json │ ├── n_structure_double_array.json.skip │ ├── n_structure_end_array.json │ ├── n_structure_incomplete_UTF8_BOM.json │ ├── n_structure_lone-invalid-utf-8.json │ ├── n_structure_lone-open-bracket.json │ ├── n_structure_no_data.json.skip │ ├── n_structure_null-byte-outside-string.json │ ├── n_structure_number_with_trailing_garbage.json │ ├── n_structure_object_followed_by_closing_object.json │ ├── n_structure_object_unclosed_no_value.json │ ├── n_structure_object_with_comment.json.skip │ ├── n_structure_object_with_trailing_garbage.json.skip │ ├── n_structure_open_array_apostrophe.json │ ├── n_structure_open_array_comma.json │ ├── n_structure_open_array_object.json │ ├── n_structure_open_array_open_object.json │ ├── n_structure_open_array_open_string.json │ ├── n_structure_open_array_string.json │ ├── n_structure_open_object.json │ ├── n_structure_open_object_close_array.json │ ├── n_structure_open_object_comma.json │ ├── n_structure_open_object_open_array.json │ ├── n_structure_open_object_open_string.json │ ├── n_structure_open_object_string_with_apostrophes.json │ ├── n_structure_open_open.json │ ├── n_structure_single_eacute.json │ ├── n_structure_single_star.json │ ├── n_structure_trailing_#.json │ ├── n_structure_uescaped_LF_before_string.json │ ├── n_structure_unclosed_array.json │ ├── n_structure_unclosed_array_partial_null.json │ ├── n_structure_unclosed_array_unfinished_false.json │ ├── n_structure_unclosed_array_unfinished_true.json │ ├── n_structure_unclosed_object.json │ ├── n_structure_unicode-identifier.json │ ├── n_structure_whitespace_U+2060_word_joiner.json │ ├── n_structure_whitespace_formfeed.json │ ├── y_array_arraysWithSpaces.json │ ├── y_array_empty-string.json │ ├── y_array_empty.json │ ├── y_array_ending_with_newline.json │ ├── y_array_false.json │ ├── y_array_heterogeneous.json │ ├── y_array_null.json │ ├── y_array_with_1_and_newline.json │ ├── y_array_with_leading_space.json │ ├── y_array_with_several_null.json │ ├── y_array_with_trailing_space.json │ ├── y_number.json │ ├── y_number_0e+1.json │ ├── y_number_0e1.json │ ├── y_number_after_space.json │ ├── y_number_double_close_to_zero.json │ ├── y_number_int_with_exp.json │ ├── y_number_minus_zero.json │ ├── y_number_negative_int.json │ ├── y_number_negative_one.json │ ├── y_number_negative_zero.json │ ├── y_number_real_capital_e.json │ ├── y_number_real_capital_e_neg_exp.json │ ├── y_number_real_capital_e_pos_exp.json │ ├── y_number_real_exponent.json │ ├── y_number_real_fraction_exponent.json │ ├── y_number_real_neg_exp.json │ ├── y_number_real_pos_exponent.json │ ├── y_number_simple_int.json │ ├── y_number_simple_real.json │ ├── y_object.json │ ├── y_object_basic.json │ ├── y_object_duplicated_key.json.skip │ ├── y_object_duplicated_key_and_value.json.skip │ ├── y_object_empty.json │ ├── y_object_empty_key.json │ ├── y_object_escaped_null_in_key.json │ ├── y_object_extreme_numbers.json │ ├── y_object_long_strings.json │ ├── y_object_simple.json │ ├── y_object_string_unicode.json │ ├── y_object_with_newlines.json │ ├── y_string_1_2_3_bytes_UTF-8_sequences.json │ ├── y_string_accepted_surrogate_pair.json │ ├── y_string_accepted_surrogate_pairs.json │ ├── y_string_allowed_escapes.json │ ├── y_string_backslash_and_u_escaped_zero.json │ ├── y_string_backslash_doublequotes.json │ ├── y_string_comments.json │ ├── y_string_double_escape_a.json │ ├── y_string_double_escape_n.json │ ├── y_string_escaped_control_character.json │ ├── y_string_escaped_noncharacter.json │ ├── y_string_in_array.json │ ├── y_string_in_array_with_leading_space.json │ ├── y_string_last_surrogates_1_and_2.json │ ├── y_string_nbsp_uescaped.json │ ├── y_string_nonCharacterInUTF-8_U+10FFFF.json │ ├── y_string_nonCharacterInUTF-8_U+FFFF.json │ ├── y_string_null_escape.json │ ├── y_string_one-byte-utf-8.json │ ├── y_string_pi.json │ ├── y_string_reservedCharacterInUTF-8_U+1BFFF.json │ ├── y_string_simple_ascii.json │ ├── y_string_space.json │ ├── y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json │ ├── y_string_three-byte-utf-8.json │ ├── y_string_two-byte-utf-8.json │ ├── y_string_u+2028_line_sep.json │ ├── y_string_u+2029_par_sep.json │ ├── y_string_uEscape.json │ ├── y_string_uescaped_newline.json │ ├── y_string_unescaped_char_delete.json.skip │ ├── y_string_unicode.json │ ├── y_string_unicodeEscapedBackslash.json │ ├── y_string_unicode_2.json │ ├── y_string_unicode_U+10FFFE_nonchar.json │ ├── y_string_unicode_U+1FFFE_nonchar.json │ ├── y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json │ ├── y_string_unicode_U+2064_invisible_plus.json │ ├── y_string_unicode_U+FDD0_nonchar.json │ ├── y_string_unicode_U+FFFE_nonchar.json │ ├── y_string_unicode_escaped_double_quote.json │ ├── y_string_utf8.json │ ├── y_string_with_del_character.json.skip │ ├── y_structure_lonely_false.json │ ├── y_structure_lonely_int.json │ ├── y_structure_lonely_negative_real.json │ ├── y_structure_lonely_null.json │ ├── y_structure_lonely_string.json │ ├── y_structure_lonely_true.json │ ├── y_structure_string_empty.json │ ├── y_structure_trailing_newline.json │ ├── y_structure_true_in_array.json │ └── y_structure_whitespace_array.json │ ├── LargeFixtures │ ├── canada.json │ └── corpus.ndjson │ └── MsgPack │ └── msgpack-test-suite.json ├── LICENSE ├── Misc ├── Docs │ ├── .gitignore │ ├── Source │ │ ├── Advanced │ │ │ ├── Automation.md │ │ │ ├── Benchmark.md │ │ │ ├── Breaking.md │ │ │ ├── CoreTypes.md │ │ │ ├── NoMetaData.md │ │ │ ├── NonClassStructRoot.md │ │ │ ├── Optional.md │ │ │ ├── README.md │ │ │ ├── UEUpgrades.md │ │ │ └── WritingHandlers.md │ │ ├── Changes.md │ │ ├── Design.md │ │ ├── Examples │ │ │ ├── Custom.md │ │ │ ├── DebugDump.md │ │ │ ├── Images │ │ │ │ ├── Examples-BlueprintPrintToScreen.png │ │ │ │ ├── Examples-DebugDumpVecDatum.png │ │ │ │ └── Examples-OnBeginPlayDump.png │ │ │ ├── JSONDeserialization.md │ │ │ └── README.md │ │ ├── Extra │ │ │ ├── AnyStruct.md │ │ │ ├── Base64.md │ │ │ ├── Blueprint.md │ │ │ ├── BlueprintNodes.md │ │ │ ├── DumpAssetToLog.md │ │ │ ├── FColor.md │ │ │ ├── FieldRenamer.md │ │ │ ├── GameplayAbility.md │ │ │ ├── GameplayTag.md │ │ │ ├── Images │ │ │ │ ├── DataConfigEditorExtra-BlueprintClass.png │ │ │ │ ├── DataConfigEditorExtra-BlueprintStruct.png │ │ │ │ ├── DataConfigEditorExtra-DumpAssetToLog.png │ │ │ │ ├── DataConfigEditorExtra-DumpOutputLog.png │ │ │ │ ├── DataConfigEditorExtra-InstancedStructEditor.png │ │ │ │ ├── DataConfigEditorExtra-LoadJsonIntoAbility.png │ │ │ │ ├── DataConfigEngineExtra-BlueprintNodes.png │ │ │ │ └── DataConfigEngineExtra-BlueprintNodesDiagnostics.png │ │ │ ├── InlineStruct.md │ │ │ ├── InstancedStruct.md │ │ │ ├── JsonConverter.md │ │ │ ├── ModuleSetup.md │ │ │ ├── NDJSON.md │ │ │ ├── Nested.md │ │ │ ├── PropertyPath.md │ │ │ ├── README.md │ │ │ ├── RootObject.md │ │ │ ├── SQLite.md │ │ │ └── WriterAPI.md │ │ ├── Formats │ │ │ ├── Images │ │ │ │ └── Deserialize-CopyReference.png │ │ │ ├── JSON.md │ │ │ ├── MsgPack.md │ │ │ ├── Property.md │ │ │ └── README.md │ │ ├── Images │ │ │ ├── Integration-DataConfigAutomations.png │ │ │ ├── Integration-DataConfigCoreOutput.png │ │ │ └── Integration-DataConfigPlugin.png │ │ ├── Integration.md │ │ ├── License.md │ │ ├── Programming │ │ │ ├── DataModel.md │ │ │ ├── Env.md │ │ │ ├── ErrorHandling.md │ │ │ ├── README.md │ │ │ ├── ReaderWriter.md │ │ │ └── SerializerDeserializer.md │ │ ├── README.md │ │ └── SUMMARY.md │ ├── book.toml │ └── custom.css ├── Project │ ├── .gitignore │ ├── DcProject4.uproject │ ├── DcProject5.uproject │ ├── README.md │ └── Source │ │ ├── DataConfigHeadless.Target.cs │ │ ├── DcProject.Target.cs │ │ ├── DcProjectEditor.Target.cs │ │ ├── DcProjectEditor │ │ ├── DcProjectEditor.Build.cs │ │ ├── Private │ │ │ └── DcProjectEditor.cpp │ │ └── Public │ │ │ └── DcProjectEditor.h │ │ └── DcProjectGame │ │ ├── DcProjectGame.Build.cs │ │ ├── Private │ │ └── DcProjectGame.cpp │ │ └── Public │ │ └── DcProjectGame.h └── Scripts │ ├── make_dataconfig_ue4.py │ ├── make_dataconfig_ue5.py │ └── make_dataconfig_ue54.py └── README.md /.editorconfig: -------------------------------------------------------------------------------- 1 | root=true 2 | 3 | [*] 4 | tab_width = 4 5 | 6 | [*.{cpp,h,inl,cs}] 7 | indent_style = tab 8 | trim_trailing_whitespace = true 9 | charset = utf-8 10 | 11 | [*.{md,txt}] 12 | indent_style = space 13 | charset = utf-8 14 | indent_size = 4 15 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # host project build artifacts 2 | /Engine/ 3 | /Saved/ 4 | # misc stuff copied in here 5 | /Tmp/ 6 | -------------------------------------------------------------------------------- /DataConfig/.clang-tidy: -------------------------------------------------------------------------------- 1 | # - first furn UBT for `compile_commands.json`. it's always written to engine root 2 | # UnrealBuildTool.exe -project="Path/To/DataConfig.uplugin" DataConfigHeadless Win64 Debug -Mode=GenerateClangDatabase 3 | # - then run clang-tidy 4 | # python C:\Path\To\run-clang-tidy.py -p C:\Path\To\UnrealEngine "DataConfigCore" 5 | # clang-tidy -p C:\Path\To\UnrealEngine -fix 6 | 7 | # [clang-analyzer-core.CallAndMessage] disabled as it doesn't work with DC_TRY 8 | # [clang-analyzer-core.uninitialized.Branch] disabled for false positive in ue4 code 9 | # [clang-analyzer-core.uninitialized.UndefReturn] disabled for false positive 10 | # [clang-diagnostic-invalid-offsetof] disabled for `DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_*` 11 | # [clang-diagnostic-implicit-exception-spec-mismatch] disabled for `GENERATED_BODY` 12 | Checks: '-*,clang-diagnostic-*,misc-unused-*,clang-analyzer-core.*,bugprone-*,llvm-header-guard,llvm-namespace-comment,readability-qualified-auto,-bugprone-reserved-identifier,-bugprone-branch-clone,-bugprone-macro-parentheses,-misc-unused-parameters,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.uninitialized.Branch,-clang-analyzer-core.uninitialized.UndefReturn,-clang-diagnostic-invalid-offsetof,-clang-diagnostic-implicit-exception-spec-mismatch,-clang-diagnostic-invalid-pp-token,-bugprone-easily-swappable-parameters,-readability-qualified-auto' 13 | HeaderFilterRegex: 'Dc\w+\.h' 14 | ExtraArgs: 15 | - '-Wunused' 16 | - '-Wno-unused-parameter' 17 | - '-Wuninitialized' 18 | - '-std=c++17' # for [[nodiscard]] 19 | -------------------------------------------------------------------------------- /DataConfig/.gitignore: -------------------------------------------------------------------------------- 1 | /Resources/ClangTidy.lua* 2 | *.raddbg* 3 | 4 | # Visual Studio 2015 user specific files 5 | .vs/ 6 | 7 | # Compiled Object files 8 | *.slo 9 | *.lo 10 | *.o 11 | *.obj 12 | 13 | # Precompiled Headers 14 | *.gch 15 | *.pch 16 | 17 | # Compiled Dynamic libraries 18 | *.so 19 | *.dylib 20 | *.dll 21 | 22 | # Fortran module files 23 | *.mod 24 | 25 | # Compiled Static libraries 26 | *.lai 27 | *.la 28 | *.a 29 | *.lib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.ipa 36 | 37 | # These project files can be generated by the engine 38 | *.xcodeproj 39 | *.xcworkspace 40 | *.sln 41 | *.suo 42 | *.opensdf 43 | *.sdf 44 | *.VC.db 45 | *.VC.opendb 46 | 47 | # Precompiled Assets 48 | SourceArt/**/*.png 49 | SourceArt/**/*.tga 50 | 51 | # Binary Files 52 | Binaries/* 53 | Plugins/*/Binaries/* 54 | 55 | # Builds 56 | Build/* 57 | 58 | # Whitelist PakBlacklist-.txt files 59 | !Build/*/ 60 | Build/*/** 61 | !Build/*/PakBlacklist*.txt 62 | 63 | # Don't ignore icon files in Build 64 | !Build/**/*.ico 65 | 66 | # Built data for maps 67 | *_BuiltData.uasset 68 | 69 | # Configuration files generated by the Editor 70 | Saved/* 71 | 72 | # Compiled source files for the engine to use 73 | Intermediate/* 74 | Plugins/*/Intermediate/* 75 | 76 | # Cache files for the editor to use 77 | DerivedDataCache/* 78 | -------------------------------------------------------------------------------- /DataConfig/Content/DcFixture/DcTestBlueprintClassAlpha.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Content/DcFixture/DcTestBlueprintClassAlpha.uasset -------------------------------------------------------------------------------- /DataConfig/Content/DcFixture/DcTestBlueprintClassBeta.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Content/DcFixture/DcTestBlueprintClassBeta.uasset -------------------------------------------------------------------------------- /DataConfig/Content/DcFixture/DcTestBlueprintEnum.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Content/DcFixture/DcTestBlueprintEnum.uasset -------------------------------------------------------------------------------- /DataConfig/Content/DcFixture/DcTestBlueprintInstanceAlpha.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Content/DcFixture/DcTestBlueprintInstanceAlpha.uasset -------------------------------------------------------------------------------- /DataConfig/Content/DcFixture/DcTestBlueprintInstanceBeta.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Content/DcFixture/DcTestBlueprintInstanceBeta.uasset -------------------------------------------------------------------------------- /DataConfig/Content/DcFixture/DcTestBlueprintStructWithColor.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Content/DcFixture/DcTestBlueprintStructWithColor.uasset -------------------------------------------------------------------------------- /DataConfig/Content/DcFixture/DcTestGameplayAbilityAlpha.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Content/DcFixture/DcTestGameplayAbilityAlpha.uasset -------------------------------------------------------------------------------- /DataConfig/Content/DcFixture/DcTestGameplayEffectAlpha.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Content/DcFixture/DcTestGameplayEffectAlpha.uasset -------------------------------------------------------------------------------- /DataConfig/Content/DcFixture/DcTestNativeDataAssetAlpha.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Content/DcFixture/DcTestNativeDataAssetAlpha.uasset -------------------------------------------------------------------------------- /DataConfig/DataConfig.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion" : 3, 3 | "Version" : 1, 4 | "VersionName" : "1.0", 5 | "FriendlyName" : "Data Config", 6 | "Description" : "Serialization framework for Unreal Engine that just works!", 7 | "Category" : "Editor", 8 | "SupportURL" : "", 9 | "EnabledByDefault" : true, 10 | "CanContainContent" : true, 11 | "IsBetaVersion" : false, 12 | "Installed" : false, 13 | "Modules": [ 14 | { 15 | "Name": "DataConfigCore", 16 | "Type": "Runtime", 17 | "LoadingPhase": "None" 18 | }, 19 | { 20 | "Name": "DataConfigExtra", 21 | "Type": "Runtime", 22 | "LoadingPhase": "Default" 23 | }, 24 | { 25 | "Name": "DataConfigEngineExtra", 26 | "Type": "Runtime", 27 | "LoadingPhase": "Default" 28 | }, 29 | { 30 | "Name": "DataConfigEngineExtra5", 31 | "Type": "Editor", 32 | "LoadingPhase": "Default" 33 | }, 34 | { 35 | "Name": "DataConfigTests", 36 | "Type": "Editor", 37 | "LoadingPhase": "Default" 38 | }, 39 | { 40 | "Name": "DataConfigEditorExtra", 41 | "Type": "Editor", 42 | "LoadingPhase": "Default" 43 | }, 44 | { 45 | "Name": "DataConfigTests5", 46 | "Type": "Editor", 47 | "LoadingPhase": "Default" 48 | } 49 | ], 50 | "Plugins": [ 51 | { 52 | "Name": "GameplayAbilities", 53 | "Enabled": true 54 | }, 55 | { 56 | "Name": "SQLiteCore", 57 | "Enabled": true 58 | } 59 | ] 60 | } 61 | -------------------------------------------------------------------------------- /DataConfig/DataConfig4.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion" : 3, 3 | "Version" : 1, 4 | "VersionName" : "1.0", 5 | "FriendlyName" : "Data Config UE4", 6 | "Description" : "Serialization framework for Unreal Engine that just works!", 7 | "Category" : "Editor", 8 | "SupportURL" : "", 9 | "EnabledByDefault" : true, 10 | "CanContainContent" : true, 11 | "IsBetaVersion" : false, 12 | "Installed" : false, 13 | "Modules": [ 14 | { 15 | "Name": "DataConfigCore", 16 | "Type": "Runtime", 17 | "LoadingPhase": "None" 18 | }, 19 | { 20 | "Name": "DataConfigExtra", 21 | "Type": "Runtime", 22 | "LoadingPhase": "Default" 23 | }, 24 | { 25 | "Name": "DataConfigEngineExtra", 26 | "Type": "Runtime", 27 | "LoadingPhase": "Default" 28 | }, 29 | { 30 | "Name": "DataConfigTests", 31 | "Type": "Editor", 32 | "LoadingPhase": "Default" 33 | }, 34 | { 35 | "Name": "DataConfigEditorExtra", 36 | "Type": "Editor", 37 | "LoadingPhase": "Default" 38 | } 39 | ], 40 | "Plugins": [ 41 | { 42 | "Name": "GameplayAbilities", 43 | "Enabled": true 44 | }, 45 | { 46 | "Name": "SQLiteCore", 47 | "Enabled": true 48 | } 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /DataConfig/DataConfig54.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion" : 3, 3 | "Version" : 1, 4 | "VersionName" : "1.0", 5 | "FriendlyName" : "Data Config", 6 | "Description" : "Serialization framework for Unreal Engine that just works!", 7 | "Category" : "Editor", 8 | "SupportURL" : "", 9 | "EnabledByDefault" : true, 10 | "CanContainContent" : true, 11 | "IsBetaVersion" : false, 12 | "Installed" : false, 13 | "Modules": [ 14 | { 15 | "Name": "DataConfigCore", 16 | "Type": "Runtime", 17 | "LoadingPhase": "None" 18 | }, 19 | { 20 | "Name": "DataConfigExtra", 21 | "Type": "Runtime", 22 | "LoadingPhase": "Default" 23 | }, 24 | { 25 | "Name": "DataConfigEngineExtra", 26 | "Type": "Runtime", 27 | "LoadingPhase": "Default" 28 | }, 29 | { 30 | "Name": "DataConfigEngineExtra5", 31 | "Type": "Editor", 32 | "LoadingPhase": "Default" 33 | }, 34 | { 35 | "Name": "DataConfigTests", 36 | "Type": "Editor", 37 | "LoadingPhase": "Default" 38 | }, 39 | { 40 | "Name": "DataConfigEditorExtra", 41 | "Type": "Editor", 42 | "LoadingPhase": "Default" 43 | }, 44 | { 45 | "Name": "DataConfigTests5", 46 | "Type": "Editor", 47 | "LoadingPhase": "Default" 48 | } 49 | ], 50 | "Plugins": [ 51 | { 52 | "Name": "GameplayAbilities", 53 | "Enabled": true 54 | }, 55 | { 56 | "Name": "SQLiteCore", 57 | "Enabled": true 58 | }, 59 | { 60 | "Name": "StructUtils", 61 | "Enabled": true 62 | } 63 | ] 64 | } 65 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/DataConfigCore.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | 3 | public class DataConfigCore : ModuleRules 4 | { 5 | public DataConfigCore(ReadOnlyTargetRules Target) : base(Target) 6 | { 7 | // source type module, pay extra attention to api boundry 8 | bRequiresImplementModule = false; 9 | 10 | Type = ModuleType.CPlusPlus; 11 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 12 | 13 | #if UE_5_2_OR_LATER 14 | IWYUSupport = IWYUSupport.Full; 15 | #else 16 | bEnforceIWYU = true; 17 | #endif 18 | 19 | PublicDependencyModuleNames.AddRange( 20 | new string[] { 21 | "Core", 22 | "CoreUObject", 23 | }); 24 | 25 | if (Target.Configuration == UnrealTargetConfiguration.Shipping) 26 | { 27 | PublicDefinitions.Add("DC_BUILD_FAST=1"); 28 | } 29 | else 30 | { 31 | PublicDefinitions.Add("DC_BUILD_DEBUG=1"); 32 | } 33 | 34 | // toggle for debug unity 35 | //bUseUnity = false; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/DataConfigCore.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {*(FDcBaseReadState*)(&ImplStorage)} 6 | 7 | *(FDcBaseReadState*)(&ImplStorage) 8 | 9 | 10 | 11 | 12 | {*(FDcBaseWriteState*)(&ImplStorage)} 13 | 14 | *(FDcBaseWriteState*)(&ImplStorage) 15 | 16 | 17 | 18 | 19 | 20 | {Buffer->Buffer+Begin,[Num]su} 21 | Buffer->Buffer+Begin,[Num]su 22 | 23 | 24 | {Buffer->Buffer+Begin,[Num]s} 25 | Buffer->Buffer+Begin,[Num]s 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/DcCorePrivate.cpp: -------------------------------------------------------------------------------- 1 | #include "DcCorePrivate.h" 2 | #include "Misc/EngineVersionComparison.h" 3 | 4 | #if UE_VERSION_OLDER_THAN(5, 5, 0) 5 | // 5.5 get rids of this boilerplate 6 | 7 | #if !IS_MONOLITHIC 8 | 9 | // amend module boilerplate on modular builds 10 | PER_MODULE_BOILERPLATE 11 | 12 | #endif 13 | 14 | #endif // !UE_VERSION_OLDER_THAN(5, 5, 0) 15 | 16 | namespace DcCorePrivate { 17 | 18 | void FStringNewlineDevice::Serialize(const TCHAR* InData, ELogVerbosity::Type Verbosity, const class FName& Category) 19 | { 20 | FString::operator+=((TCHAR*)InData); 21 | *this += LINE_TERMINATOR; 22 | } 23 | 24 | FString& FStringNewlineDevice::operator+=(const FString& Other) 25 | { 26 | return FString::operator+=(Other); 27 | } 28 | 29 | 30 | } // namespace DcCorePrivate 31 | 32 | 33 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/DcCorePrivate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | 5 | /// sharing private code 6 | 7 | namespace DcCorePrivate { 8 | 9 | struct FStringNewlineDevice : public FString, public FOutputDevice 10 | { 11 | FStringNewlineDevice() 12 | : FString() 13 | {} 14 | 15 | void Serialize(const TCHAR* InData, ELogVerbosity::Type Verbosity, const class FName& Category) override; 16 | virtual FString& operator+=(const FString& Other); 17 | }; 18 | 19 | 20 | } // namespace DcCorePrivate 21 | 22 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/DcTypes.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/DcTypes.h" 2 | 3 | DEFINE_LOG_CATEGORY(LogDataConfigCore); 4 | 5 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/Deserialize/DcDeserializeTypes.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 2 | #include "DataConfig/DcEnv.h" 3 | #include "DataConfig/Diagnostic/DcDiagnosticSerDe.h" 4 | #include "DataConfig/Diagnostic/DcDiagnosticUtils.h" 5 | #include "DataConfig/Property/DcPropertyWriter.h" 6 | 7 | FDcResult FDcDeserializeContext::Prepare() 8 | { 9 | DC_TRY(DcExpect(State == EState::Uninitialized, [&]{ 10 | return DC_FAIL(DcDSerDe, ContextInvalidState) << (int)State; 11 | })); 12 | 13 | DC_TRY(DcExpect(Reader != nullptr, []{ 14 | return DC_FAIL(DcDSerDe, ContextReaderNotFound); 15 | })); 16 | 17 | DC_TRY(DcExpect(Writer != nullptr, []{ 18 | return DC_FAIL(DcDSerDe, ContextWriterNotFound); 19 | })); 20 | 21 | DC_TRY(DcExpect(Deserializer != nullptr, []{ 22 | return DC_FAIL(DcDSerDe, ContextDeserializerNotFound); 23 | })); 24 | 25 | // for convenience if no top properties are provide, we peek one from property writer. 26 | if (Properties.Num() == 0) 27 | { 28 | FFieldVariant RootProperty; 29 | DC_TRY(Writer->PeekWriteProperty(&RootProperty)); 30 | Properties.Push(RootProperty); 31 | } 32 | else if (Properties.Num() == 1) 33 | { 34 | // pass 35 | } 36 | else 37 | { 38 | return DC_FAIL(DcDSerDe, ContextExpectOneProperty) << Properties.Num(); 39 | } 40 | 41 | State = EState::Ready; 42 | return DcOk(); 43 | } 44 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/Deserialize/DcDeserializeUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Deserialize/DcDeserializeUtils.h" 2 | #include "DataConfig/Deserialize/DcDeserializer.h" 3 | #include "DataConfig/DcEnv.h" 4 | #include "DataConfig/Diagnostic/DcDiagnosticSerDe.h" 5 | #include "DataConfig/Property/DcPropertyWriter.h" 6 | 7 | namespace DcDeserializeUtils 8 | { 9 | 10 | FDcResult RecursiveDeserialize(FDcDeserializeContext& Ctx) 11 | { 12 | FFieldVariant Property; 13 | DC_TRY(Ctx.Writer->PeekWriteProperty(&Property)); 14 | Ctx.Properties.Push(Property); 15 | 16 | DC_TRY(Ctx.Deserializer->Deserialize(Ctx)); 17 | 18 | FFieldVariant Popped = Ctx.Properties.Pop(); 19 | if (Property != Popped) 20 | return DC_FAIL(DcDSerDe, RecursiveDeserializeTopPropertyChanged); 21 | 22 | return DcOk(); 23 | } 24 | 25 | EDcDeserializePredicateResult PredicateIsRootProperty(FDcDeserializeContext& Ctx) 26 | { 27 | check(Ctx.Properties.Num() > 0); 28 | return Ctx.TopProperty() == Ctx.Properties[0] 29 | ? EDcDeserializePredicateResult::Process 30 | : EDcDeserializePredicateResult::Pass; 31 | } 32 | 33 | } // namespace DcDeserializeUtils 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/Deserialize/Handlers/MsgPack/DcMsgPackCommonDeserializers.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Deserialize/Handlers/MsgPack/DcMsgPackCommonDeserializers.h" 2 | #include "DataConfig/Deserialize/DcDeserializer.h" 3 | #include "DataConfig/Deserialize/DcDeserializeUtils.h" 4 | #include "DataConfig/Property/DcPropertyWriter.h" 5 | #include "DataConfig/Reader/DcReader.h" 6 | #include "DataConfig/MsgPack/DcMsgPackUtils.h" 7 | 8 | #include "DataConfig/SerDe/DcSerDeUtils.inl" 9 | #include "DataConfig/SerDe/DcSerDeCommon.inl" 10 | #include "DataConfig/SerDe/DcDeserializeCommon.inl" 11 | 12 | namespace DcMsgPackHandlers { 13 | 14 | FDcResult HandlerMapDeserialize(FDcDeserializeContext& Ctx) 15 | { 16 | return DcHandlerPipeMap< 17 | FDcDeserializeContext, 18 | FDcReader, 19 | FDcPropertyWriter, 20 | &DcDeserializeUtils::RecursiveDeserialize 21 | >(Ctx); 22 | } 23 | 24 | EDcDeserializePredicateResult PredicateIsBlobProperty(FDcDeserializeContext& Ctx) 25 | { 26 | #if WITH_EDITORONLY_DATA 27 | return Ctx.TopProperty().HasMetaData(DcMsgPackUtils::DC_META_MSGPACK_BLOB) 28 | ? EDcDeserializePredicateResult::Process 29 | : EDcDeserializePredicateResult::Pass; 30 | #else 31 | return EDcDeserializePredicateResult::Pass; 32 | #endif // WITH_EDITORONLY_DATA 33 | 34 | } 35 | 36 | FDcResult HandlerBlobDeserialize(FDcDeserializeContext& Ctx) 37 | { 38 | return DcPipe_Blob(Ctx.Reader, Ctx.Writer); 39 | } 40 | 41 | } // namespace DcMsgPackHandlers 42 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/Diagnostic/DcDiagnosticCommon.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Diagnostic/DcDiagnosticCommon.h" 2 | #include "DataConfig/Diagnostic/DcDiagnostic.h" 3 | 4 | namespace DcDCommon 5 | { 6 | 7 | static FDcDiagnosticDetail _CommonDetails[] = { 8 | { Unhandled, TEXT("Unhandled error, stack:\n{0}") }, 9 | { NotImplemented, TEXT("Calling into methods that are not implemented") }, 10 | { Unreachable, TEXT("Calling into unreachable code") }, 11 | { Unexpected1, TEXT("Unexpected: '{0}'") }, 12 | { PlaceHoldError, TEXT("<<>>") }, 13 | 14 | { StaleDelegate, TEXT("Stale delegate") }, 15 | { StaleDelegateWithName, TEXT("Stale delegate: {0}") }, 16 | 17 | { CustomMessage, TEXT("Custom Diagnostic Message: {0}") }, 18 | }; 19 | 20 | FDcDiagnosticGroup Details = { 21 | Category, 22 | DcDimOf(_CommonDetails), 23 | _CommonDetails 24 | }; 25 | 26 | } // namespace DcDCommon 27 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/Diagnostic/DcDiagnosticMsgPack.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Diagnostic/DcDiagnosticMsgPack.h" 2 | #include "DataConfig/Diagnostic/DcDiagnostic.h" 3 | 4 | namespace DcDMsgPack 5 | { 6 | 7 | static FDcDiagnosticDetail _MsgPackDetails[] = { 8 | 9 | { TypeByteMismatch, TEXT("MsgPack type byte mismatch, Expect '{0}', Actual '{1}'")}, 10 | { TypeByteMismatchNoExpect, TEXT("MsgPack type byte mismatch, Actual '{0}'")}, 11 | { UnexpectedArrayEnd, TEXT("Unexpected array end"), }, 12 | { UnexpectedMapEnd, TEXT("Unexpected map end"), }, 13 | { ReadPassArrayEnd, TEXT("Reading pass array end"), }, 14 | { ReadPassMapEnd, TEXT("Reading pass map end"), }, 15 | 16 | // Reader 17 | { UnknownMsgTypeByte, TEXT("Unknown MsgPack type byte: 0x{0}"), }, 18 | { ReadingPastEnd, TEXT("Buffer already ended, can not read any value"), }, 19 | { SizeOverInt32Max, TEXT("Size over int32::max isn't supported yet."), }, 20 | { ArrayRemains, TEXT("Array ins't fully consumed on end, remains: {0}"), }, 21 | { MapRemains, TEXT("Map ins't fully consumed on end, remains: {0}"), }, 22 | 23 | }; 24 | 25 | FDcDiagnosticGroup Details = { 26 | Category, 27 | DcDimOf(_MsgPackDetails), 28 | _MsgPackDetails 29 | }; 30 | 31 | } // namespace DcDMsgPack 32 | 33 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/MsgPack/DcMsgPackCommon.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/MsgPack/DcMsgPackCommon.h" 2 | 3 | namespace DcMsgPackCommon 4 | { 5 | 6 | } // namespace DcMsgPackCommon 7 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/Property/DcPropertyDatum.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Property/DcPropertyDatum.h" 2 | 3 | const FDcPropertyDatum FDcPropertyDatum::NONE = FDcPropertyDatum(); 4 | 5 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/Serialize/DcSerializeTypes.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Serialize/DcSerializeTypes.h" 2 | #include "DataConfig/DcEnv.h" 3 | #include "DataConfig/Diagnostic/DcDiagnosticSerDe.h" 4 | #include "DataConfig/Diagnostic/DcDiagnosticUtils.h" 5 | #include "DataConfig/Property/DcPropertyReader.h" 6 | 7 | FDcResult FDcSerializeContext::Prepare() 8 | { 9 | DC_TRY(DcExpect(State == EState::Uninitialized, [&]{ 10 | return DC_FAIL(DcDSerDe, ContextInvalidState) << (int)State; 11 | })); 12 | 13 | DC_TRY(DcExpect(Reader != nullptr, []{ 14 | return DC_FAIL(DcDSerDe, ContextReaderNotFound); 15 | })); 16 | 17 | DC_TRY(DcExpect(Writer != nullptr, []{ 18 | return DC_FAIL(DcDSerDe, ContextWriterNotFound); 19 | })); 20 | 21 | DC_TRY(DcExpect(Serializer != nullptr, []{ 22 | return DC_FAIL(DcDSerDe, ContextSerializerNotFound); 23 | })); 24 | 25 | // for convenience if no top properties are provide, we peek one from property writer. 26 | if (Properties.Num() == 0) 27 | { 28 | FFieldVariant RootProperty; 29 | DC_TRY(Reader->PeekReadProperty(&RootProperty)); 30 | Properties.Push(RootProperty); 31 | } 32 | else if (Properties.Num() == 1) 33 | { 34 | // pass 35 | } 36 | else 37 | { 38 | return DC_FAIL(DcDSerDe, ContextExpectOneProperty) << Properties.Num(); 39 | } 40 | 41 | State = EState::Ready; 42 | return DcOk(); 43 | 44 | } 45 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/Serialize/Handlers/MsgPack/DcMsgPackCommonSerializers.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Serialize/Handlers/MsgPack/DcMsgPackCommonSerializers.h" 2 | #include "DataConfig/MsgPack/DcMsgPackUtils.h" 3 | #include "DataConfig/Property/DcPropertyReader.h" 4 | #include "DataConfig/Serialize/DcSerializer.h" 5 | #include "DataConfig/Serialize/DcSerializeUtils.h" 6 | #include "DataConfig/Writer/DcWriter.h" 7 | 8 | #include "DataConfig/SerDe/DcSerDeCommon.inl" 9 | #include "DataConfig/SerDe/DcSerDeUtils.inl" 10 | #include "DataConfig/SerDe/DcSerializeCommon.inl" 11 | 12 | namespace DcMsgPackHandlers 13 | { 14 | 15 | FDcResult HandlerMapSerialize(FDcSerializeContext& Ctx) 16 | { 17 | return DcHandlerPipeMap< 18 | FDcSerializeContext, 19 | FDcPropertyReader, 20 | FDcWriter, 21 | &DcSerializeUtils::RecursiveSerialize 22 | >(Ctx); 23 | } 24 | 25 | EDcSerializePredicateResult PredicateIsBlobProperty(FDcSerializeContext& Ctx) 26 | { 27 | #if WITH_EDITORONLY_DATA 28 | return Ctx.TopProperty().HasMetaData(DcMsgPackUtils::DC_META_MSGPACK_BLOB) 29 | ? EDcSerializePredicateResult::Process 30 | : EDcSerializePredicateResult::Pass; 31 | #else 32 | return EDcSerializePredicateResult::Pass; 33 | #endif // WITH_EDITORONLY_DATA 34 | } 35 | 36 | FDcResult HandlerBlobSerialize(FDcSerializeContext& Ctx) 37 | { 38 | return DcPipe_Blob(Ctx.Reader, Ctx.Writer); 39 | } 40 | 41 | } // namespace DcMsgPackHandlers 42 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/Source/DcSourceTypes.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Source/DcSourceTypes.h" 2 | 3 | // pass 4 | 5 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Private/DataConfig/Source/DcSourceUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Source/DcSourceUtils.h" 2 | 3 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/DcMacros.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef DC_BUILD_DEBUG 4 | #define DC_BUILD_DEBUG 0 5 | #endif 6 | 7 | // note that DC_BUILD_FAST does nothing atm, we'll do a performance pass in a future release 8 | #ifndef DC_BUILD_FAST 9 | #define DC_BUILD_FAST 0 10 | #endif 11 | 12 | #if DC_BUILD_DEBUG + DC_BUILD_FAST != 1 13 | #error Exactly one of [DC_BUILD_DEBUG DC_BUILD_FAST] should be define to 1 14 | #endif 15 | 16 | #define DC_STRINGIFY(x) DC_STRINGIFY2(x) 17 | #define DC_STRINGIFY2(x) #x 18 | 19 | #define DC_JOIN(a, b) DC_JOIN2(a, b) 20 | #define DC_JOIN2(a, b) a##b 21 | #define DC_UNIQUE(a) DC_JOIN(a, __LINE__) 22 | 23 | #ifndef DC_NODISCARD 24 | #if __cplusplus >= 201703L 25 | #define DC_NODISCARD [[nodiscard]] 26 | #else 27 | #define DC_NODISCARD 28 | #endif 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/DcVersion.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define DATA_CONFIG_CORE_VERSION "1.7.4" 4 | #define DATA_CONFIG_CORE_VERSION_NUMBER 10704 5 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Deserialize/DcDeserializeUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/Property/DcPropertyUtils.h" 5 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 6 | 7 | namespace DcDeserializeUtils 8 | { 9 | 10 | DATACONFIGCORE_API FDcResult RecursiveDeserialize(FDcDeserializeContext& Ctx); 11 | 12 | DATACONFIGCORE_API EDcDeserializePredicateResult PredicateIsRootProperty(FDcDeserializeContext& Ctx); 13 | 14 | } // namespace DcDeserializeUtils 15 | 16 | 17 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Deserialize/DcDeserializer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "Templates/Tuple.h" 5 | #include "DataConfig/DcTypes.h" 6 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 7 | 8 | struct DATACONFIGCORE_API FDcDeserializer : public FNoncopyable 9 | { 10 | FDcResult Deserialize(FDcDeserializeContext& Ctx); 11 | 12 | void AddDirectHandler(FFieldClass* PropertyClass, FDcDeserializeDelegate&& Delegate); 13 | void AddDirectHandler(UClass* PropertyClass, FDcDeserializeDelegate&& Delegate); 14 | void AddPredicatedHandler(FDcDeserializePredicate&& Predicate, FDcDeserializeDelegate&& Delegate, const FName Name = NAME_None); 15 | void AddStructHandler(UStruct* Struct, FDcDeserializeDelegate&& Delegate); 16 | 17 | struct FPredicatedHandlerEntry 18 | { 19 | FDcDeserializePredicate Predicate; 20 | FDcDeserializeDelegate Handler; 21 | FName Name; 22 | }; 23 | TArray PredicatedDeserializers; 24 | 25 | TMap UClassDeserializerMap; 26 | TMap FieldClassDeserializerMap; 27 | TMap StructDeserializeMap; 28 | }; 29 | 30 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Deserialize/DcDeserializerSetup.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 5 | 6 | enum class EDcJsonDeserializeType 7 | { 8 | Default, 9 | StringSoftLazy, // Deserialize Soft/Lazy references as string 10 | }; 11 | 12 | DATACONFIGCORE_API void DcSetupJsonDeserializeHandlers(FDcDeserializer& Deserializer, EDcJsonDeserializeType Type = EDcJsonDeserializeType::Default); 13 | 14 | DATACONFIGCORE_API void DcSetupPropertyPipeDeserializeHandlers(FDcDeserializer& Deserializer); 15 | 16 | enum class EDcMsgPackDeserializeType 17 | { 18 | Default, 19 | StringSoftLazy, // Deserialize Soft/Lazy references as string 20 | InMemory, // Deserialize pointer/enum/FName etc as underlying integer values 21 | }; 22 | 23 | DATACONFIGCORE_API void DcSetupMsgPackDeserializeHandlers(FDcDeserializer& Deserializer, EDcMsgPackDeserializeType Type = EDcMsgPackDeserializeType::Default); 24 | 25 | DATACONFIGCORE_API void DcSetupCoreTypesDeserializeHandlers(FDcDeserializer& Deserializer); 26 | 27 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Deserialize/Handlers/Common/DcObjectDeserializers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 5 | 6 | namespace DcCommonHandlers { 7 | 8 | /// Deserializers that would all use a loaded, in memory `UObject*` even if it's lazy/soft/etc. 9 | DATACONFIGCORE_API FDcResult HandlerObjectReferenceDeserialize(FDcDeserializeContext& Ctx); 10 | DATACONFIGCORE_API FDcResult HandlerSoftObjectReferenceDeserialize(FDcDeserializeContext& Ctx); 11 | DATACONFIGCORE_API FDcResult HandlerWeakObjectReferenceDeserialize(FDcDeserializeContext& Ctx); 12 | DATACONFIGCORE_API FDcResult HandlerLazyObjectReferenceDeserialize(FDcDeserializeContext& Ctx); 13 | 14 | DATACONFIGCORE_API FDcResult HandlerClassReferenceDeserialize(FDcDeserializeContext& Ctx); 15 | DATACONFIGCORE_API FDcResult HandlerSoftClassReferenceDeserialize(FDcDeserializeContext& Ctx); 16 | 17 | /// Deserialize Soft/Lazy as string, without loading actual object 18 | DATACONFIGCORE_API FDcResult HandlerStringToSoftObjectDeserialize(FDcDeserializeContext& Ctx); 19 | DATACONFIGCORE_API FDcResult HandlerStringToLazyObjectDeserialize(FDcDeserializeContext& Ctx); 20 | DATACONFIGCORE_API FDcResult HandlerStringToSoftClassDeserialize(FDcDeserializeContext& Ctx); 21 | 22 | DATACONFIGCORE_API EDcDeserializePredicateResult PredicateIsSubObjectProperty(FDcDeserializeContext& Ctx); 23 | 24 | DATACONFIGCORE_API FDcResult HandlerInstancedSubObjectDeserialize(FDcDeserializeContext& Ctx); 25 | 26 | } // namespace DcCommonHandlers 27 | 28 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Deserialize/Handlers/MsgPack/DcMsgPackCommonDeserializers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/DcTypes.h" 5 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 6 | 7 | namespace DcMsgPackHandlers { 8 | 9 | DATACONFIGCORE_API FDcResult HandlerMapDeserialize(FDcDeserializeContext& Ctx); 10 | 11 | DATACONFIGCORE_API EDcDeserializePredicateResult PredicateIsBlobProperty(FDcDeserializeContext& Ctx); 12 | DATACONFIGCORE_API FDcResult HandlerBlobDeserialize(FDcDeserializeContext& Ctx); 13 | 14 | } // namespace DcMsgPackHandlers 15 | 16 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Deserialize/Handlers/Property/DcPropertyPipeDeserializers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/DcTypes.h" 5 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 6 | 7 | namespace DcPropertyPipeHandlers { 8 | 9 | DATACONFIGCORE_API FDcResult HandlerSetDeserialize(FDcDeserializeContext& Ctx); 10 | DATACONFIGCORE_API FDcResult HandlerMapDeserialize(FDcDeserializeContext& Ctx); 11 | DATACONFIGCORE_API FDcResult HandlerStructDeserialize(FDcDeserializeContext& Ctx); 12 | DATACONFIGCORE_API FDcResult HandlerClassDeserialize(FDcDeserializeContext& Ctx); 13 | DATACONFIGCORE_API FDcResult HandlerOptionalDeserialize(FDcDeserializeContext& Ctx); 14 | 15 | } // namespace DcPropertyPipeHandlers 16 | 17 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Diagnostic/DcDiagnosticCommon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "HAL/Platform.h" 4 | 5 | namespace DcDCommon 6 | { 7 | 8 | static const uint16 Category = 0x1; 9 | 10 | enum Type : uint16 11 | { 12 | Unknown = 0, 13 | Unhandled = 1, // hard coded 1 14 | Unreachable = 2, // hard coded 2 15 | NotImplemented, 16 | Unexpected1, 17 | 18 | StaleDelegate, 19 | StaleDelegateWithName, 20 | 21 | CustomMessage, 22 | 23 | PlaceHoldError, 24 | }; 25 | 26 | } // namespace DcDCommon 27 | 28 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Diagnostic/DcDiagnosticJSON.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "HAL/Platform.h" 4 | 5 | namespace DcDJSON 6 | { 7 | 8 | static const uint16 Category = 0x3; 9 | 10 | enum Type : uint16 11 | { 12 | Unknown = 0, 13 | ExpectWordButNotFound, 14 | ExpectWordButEOF, 15 | UnexpectedChar, 16 | UnexpectedToken, 17 | UnexpectedEOF, 18 | UnclosedBlockComment, 19 | UnclosedStringLiteral, 20 | InvalidStringEscaping, 21 | InvalidControlCharInString, 22 | ReadUnsignedWithNegativeNumber, 23 | ParseIntegerFailed, 24 | DuplicatedKey, 25 | KeyMustBeString, 26 | ReadTypeMismatch, 27 | ExpectComma, 28 | ExpectStateInProgress, 29 | ExpectStateUninitializedOrFinished, 30 | UnexpectedTrailingToken, 31 | 32 | // Number 33 | NumberInvalidChar, 34 | NumberExpectDigitAfterMinus, 35 | NumberExpectDigitAfterDot, 36 | NumberExpectSignDigitAfterExp, 37 | NumberExpectDigitAfterExpSign, 38 | 39 | // End 40 | EndUnclosedArray, 41 | EndUnclosedObject, 42 | 43 | // Writer 44 | ExpectStringAtObjectKey, 45 | UnexpectedArrayEnd, 46 | UnexpectedObjectEnd, 47 | NumericFormatOutOfRange, 48 | }; 49 | 50 | } // namespace DcDJSON 51 | 52 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Diagnostic/DcDiagnosticMsgPack.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "HAL/Platform.h" 4 | 5 | namespace DcDMsgPack 6 | { 7 | 8 | static const uint16 Category = 0x5; 9 | 10 | enum Type : uint16 11 | { 12 | Unknown = 0, 13 | 14 | TypeByteMismatch, 15 | TypeByteMismatchNoExpect, 16 | UnexpectedArrayEnd, 17 | UnexpectedMapEnd, 18 | ReadPassArrayEnd, 19 | ReadPassMapEnd, 20 | 21 | // Reader 22 | UnknownMsgTypeByte, 23 | ReadingPastEnd, 24 | SizeOverInt32Max, 25 | ArrayRemains, 26 | MapRemains, 27 | 28 | }; 29 | 30 | } // namespace DcDMsgPack 31 | 32 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Diagnostic/DcDiagnosticReadWrite.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "HAL/Platform.h" 4 | 5 | namespace DcDReadWrite 6 | { 7 | 8 | static const uint16 Category = 0x2; 9 | 10 | enum Type : uint16 11 | { 12 | Unknown = 0, 13 | InvalidStateNoExpect, 14 | InvalidStateWithExpect, 15 | InvalidStateWithExpect2, 16 | DataTypeMismatch, 17 | DataTypeMismatch2, 18 | DataTypeMismatchNoExpect, 19 | DataTypeMismatchNoCoercion, 20 | PropertyMismatch, 21 | PropertyMismatch2, 22 | AlreadyEnded, 23 | CantFindPropertyByName, 24 | WriteClassInlineNotCreated, 25 | StructNameMismatch, 26 | ClassNameMismatch, 27 | EnumNameMismatch, 28 | EnumNameNotFound, 29 | EnumValueInvalid, 30 | EnumSignMismatch, 31 | EnumMissingEnum, 32 | WriteBlobOverrun, 33 | FindPropertyByOffsetFailed, 34 | DataTypeUnequal, 35 | DataTypeUnequalLhsRhs, 36 | ExpectFieldButFoundUObject, 37 | FNameOverSize, 38 | HeuristicInvalidPointer, 39 | ReaderCastExpect, 40 | WriterCastExpect, 41 | PeekNoContainerProperty, 42 | PropertyNotSupportedUEVersion, 43 | HeuristicPropertiesTooDeep, 44 | 45 | // property writer 46 | WriteObjectReferenceDoNotAcceptNull, 47 | 48 | // putback reader 49 | CantUsePutbackValue, 50 | 51 | // pipe visitor 52 | PipeReadWriteMismatch, 53 | 54 | // skip 55 | SkipOutOfRange, 56 | 57 | 58 | }; 59 | 60 | } // namespace DcDReadWrite 61 | 62 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Diagnostic/DcDiagnosticSerDe.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "HAL/Platform.h" 4 | 5 | namespace DcDSerDe 6 | { 7 | 8 | static const uint16 Category = 0x4; 9 | 10 | enum Type : uint16 11 | { 12 | Unknown = 0, 13 | NotPrepared, 14 | NoMatchingHandler, 15 | MismatchHandler, 16 | DataEntryMismatch, 17 | DataEntryMismatch2, 18 | DataEntryMismatch3, 19 | ExpectMetaType, 20 | ExpectNumericEntry, 21 | CoercionFail, 22 | StructNotFound, 23 | UObjectTypeMismatch, 24 | UObjectByStrNotFound, 25 | ObjectPropertyNotInline, 26 | 27 | // Deserialize 28 | RecursiveDeserializeTopPropertyChanged, 29 | ParseGUIDFailed, 30 | 31 | // Serialize 32 | RecursiveSerializeTopPropertyChanged, 33 | EnumBitFlagsNotFullyMasked, 34 | SerializerUnexpectedExpandObject, 35 | SerializerUnexpectedReadReference, 36 | 37 | // Meta 38 | MetaKeyMismatch, 39 | 40 | // Context 41 | ContextInvalidState, 42 | ContextReaderNotFound, 43 | ContextWriterNotFound, 44 | ContextSerializerNotFound, 45 | ContextDeserializerNotFound, 46 | ContextExpectOneProperty, 47 | ContextExpectOneObject, 48 | ContextMissingTopObject, 49 | 50 | // Class 51 | ClassExpectNonAbstract, 52 | ClassLhsIsNotChildOfRhs, 53 | 54 | // Struct 55 | StructLhsIsNotChildOfRhs, 56 | 57 | // Pipe 58 | PipeUnhandledEnded, 59 | PipeUnhandledExtension, 60 | 61 | // Pipe 62 | DateTimeParseFail, 63 | TimespanParseFail, 64 | }; 65 | 66 | } // namespace DcDSerDe 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Diagnostic/DcDiagnosticUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DataConfig/DcEnv.h" 4 | 5 | template 6 | FORCEINLINE FDcResult DcExpect(bool CondToBeTrue, const TThunk& ErrFunc) 7 | { 8 | if (CondToBeTrue) 9 | return DcOk(); 10 | else 11 | return ErrFunc(); 12 | } 13 | 14 | DATACONFIGCORE_API FDcResult DcExpect(bool CondToBeTrue); // placeholder expect 15 | 16 | DATACONFIGCORE_API FDcResult DcReadNextExpect(FDcReader& Reader, EDcDataEntry Expect); 17 | 18 | struct DATACONFIGCORE_API FDcScopedDiagHandler 19 | { 20 | using DiagHandlerType = TFunctionRef; 21 | FDcScopedDiagHandler(DiagHandlerType InHandler); 22 | ~FDcScopedDiagHandler(); 23 | 24 | int StartDiagCount; 25 | DiagHandlerType Handler; 26 | }; 27 | 28 | 29 | namespace DcDiagnosticUtils 30 | { 31 | 32 | DATACONFIGCORE_API void AmendDiagnostic(FDcDiagnostic& Diag, FDcReader* Reader, FDcWriter* Writer); 33 | 34 | DATACONFIGCORE_API FString StackWalkToString(int32 IgnoreCount); 35 | 36 | DATACONFIGCORE_API FString SafeObjectName(UObject* Object); 37 | 38 | } // namespace DcDiagnosticUtils 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Misc/DcPipeVisitor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DataConfig/DcTypes.h" 4 | 5 | enum class EPipeVisitControl : uint8 6 | { 7 | Pass, // do nothing 8 | BreakVisit, // early exit visit 9 | SkipContinue, // skip next pipe visit, usually means read write is handled here 10 | }; 11 | 12 | struct FDcPipeVisitor; 13 | DECLARE_DELEGATE_RetVal_TwoParams(FDcResult, FDcPipeVisitEvent, FDcPipeVisitor*, EPipeVisitControl&); 14 | DECLARE_DELEGATE_RetVal_ThreeParams(FDcResult, FDcPipeVisitPeekEvent, FDcPipeVisitor*, EDcDataEntry, EPipeVisitControl&); 15 | 16 | struct FDcReader; 17 | struct FDcWriter; 18 | 19 | struct DATACONFIGCORE_API FDcPipeVisitor 20 | { 21 | FDcReader* Reader; 22 | FDcWriter* Writer; 23 | 24 | FDcPipeVisitEvent PreVisit; 25 | FDcPipeVisitPeekEvent PeekVisit; 26 | FDcPipeVisitPeekEvent PostVisit; 27 | 28 | FDcPipeVisitor(FDcReader* InReader, FDcWriter* InWriter); 29 | 30 | FDcResult PipeVisit(); 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Misc/DcTemplateUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DataConfig/DcTypes.h" 4 | 5 | // shorthand for optional read to out pointer 6 | template 7 | FORCEINLINE static void ReadOut(T1*& OutPtr, T2&& Value) 8 | { 9 | if (OutPtr) 10 | *OutPtr = Forward(Value); 11 | } 12 | 13 | template 14 | FORCEINLINE static FDcResult ReadOutOk(T1*& OutPtr, T2&& Value) 15 | { 16 | if (OutPtr) 17 | *OutPtr = Forward(Value); 18 | 19 | return DcOk(); 20 | } 21 | 22 | template 23 | struct TDcStoreThenReset 24 | { 25 | TDcStoreThenReset(T& InRef, const T& NewValue) 26 | : Ref(InRef) 27 | { 28 | RestoreValue = Ref; 29 | Ref = NewValue; 30 | } 31 | 32 | TDcStoreThenReset(T& InRef) 33 | : Ref(InRef) 34 | { 35 | RestoreValue = Ref; 36 | } 37 | 38 | ~TDcStoreThenReset() 39 | { 40 | Ref = RestoreValue; 41 | } 42 | 43 | T& Ref; 44 | T RestoreValue; 45 | }; 46 | 47 | template 48 | constexpr bool DcIsPowerOf2(T Value) 49 | { 50 | return (Value & (Value-1)) == 0; 51 | } 52 | 53 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/MsgPack/DcMsgPackUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DataConfig/DcTypes.h" 4 | 5 | struct FDcReader; 6 | struct FDcWriter; 7 | struct FDcMsgPackReader; 8 | 9 | namespace DcMsgPackUtils 10 | { 11 | 12 | DATACONFIGCORE_API extern const FName DC_META_MSGPACK_BLOB; 13 | 14 | DATACONFIGCORE_API FDcResult MsgPackExtensionHandler(FDcReader* Reader, FDcWriter* Writer); 15 | 16 | DATACONFIGCORE_API FDcResult ReadExtBytes(FDcMsgPackReader* Reader, uint8& OutType, TArray& OutBytes); 17 | 18 | } // namespace DcMsgPackUtils 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Property/DcPropertyTypes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DataConfig/DcTypes.h" 4 | #include "UObject/UnrealType.h" 5 | 6 | using FDcProcessPropertyPredicateSignature = bool(*)(FProperty* Property); 7 | DECLARE_DELEGATE_RetVal_OneParam(bool, FDcProcessPropertyPredicateDelegate, FProperty*); 8 | 9 | using FDcExpandObjectPredicateSignature = bool(*)(FObjectProperty* ObjectProperty); 10 | DECLARE_DELEGATE_RetVal_OneParam(bool, FDcExpandObjectPredicateDelegate, FObjectProperty*); 11 | 12 | struct DATACONFIGCORE_API FDcPropertyConfig 13 | { 14 | FDcProcessPropertyPredicateDelegate ProcessPropertyPredicate; 15 | FDcExpandObjectPredicateDelegate ExpandObjectPredicate; 16 | 17 | static FDcPropertyConfig MakeDefault(); 18 | static FDcPropertyConfig MakeNoExpandObject(); 19 | 20 | FDcResult Prepare(); 21 | 22 | bool ShouldProcessProperty(FProperty* Property); 23 | FProperty* NextProcessProperty(FProperty* Property); 24 | FProperty* FirstProcessProperty(FProperty* Property); 25 | FProperty* NextProcessPropertyByName(UStruct* Struct, FProperty* InProperty, const FName& Name); 26 | FProperty* FindProcessPropertyByName(UStruct* Struct, const FName& Name); 27 | 28 | bool ShouldExpandObject(FObjectProperty* ObjectProperty); 29 | }; 30 | 31 | 32 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/SerDe/DcSerDeCoreTypesCommon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | 5 | namespace DcCoreTypesHandlers { 6 | 7 | #if ENGINE_MAJOR_VERSION == 5 8 | 9 | using FDcVector2f = FVector2f; 10 | using FDcVector3f = FVector3f; 11 | using FDcVector4f = FVector4f; 12 | using FDcMatrix44f = FMatrix44f; 13 | 14 | using FDcVector2d = FVector2d; 15 | using FDcVector3d = FVector3d; 16 | using FDcVector4d = FVector4d; 17 | using FDcMatrix44d = FMatrix44d; 18 | 19 | #else 20 | 21 | using FDcVector2f = FVector2D; 22 | using FDcVector3f = FVector; 23 | using FDcVector4f = FVector4; 24 | using FDcMatrix44f = FMatrix; 25 | 26 | #endif // ENGINE_MAJOR_VERSION == 5 27 | 28 | } // namespace DcCommonHandlers 29 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Serialize/DcSerializeTypes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/DcTypes.h" 5 | #include "DataConfig/Property/DcPropertyDatum.h" 6 | 7 | struct FDcWriter; 8 | struct FDcPropertyReader; 9 | struct FDcSerializer; 10 | 11 | struct DATACONFIGCORE_API FDcSerializeContext 12 | { 13 | enum class EState : uint8 14 | { 15 | Uninitialized, 16 | Ready, 17 | SerializeInProgress, 18 | SerializeEnded, 19 | }; 20 | 21 | EState State = EState::Uninitialized; 22 | 23 | TArray> Properties; 24 | 25 | FDcSerializer* Serializer = nullptr; 26 | FDcPropertyReader* Reader = nullptr; 27 | FDcWriter* Writer = nullptr; 28 | 29 | void* UserData = nullptr; 30 | 31 | FORCEINLINE FFieldVariant& TopProperty() 32 | { 33 | checkf(Properties.Num(), TEXT("Expect TopProperty found none.")); 34 | return Properties.Top(); 35 | } 36 | 37 | FDcResult Prepare(); 38 | }; 39 | 40 | using FDcSerializeDelegateSignature = FDcResult(*)(FDcSerializeContext& Ctx); 41 | DECLARE_DELEGATE_RetVal_OneParam(FDcResult, FDcSerializeDelegate, FDcSerializeContext&); 42 | 43 | enum class EDcSerializePredicateResult 44 | { 45 | Pass, 46 | Process, 47 | }; 48 | 49 | using FDcSerializePredicateSignature = EDcSerializePredicateResult(*)(FDcSerializeContext& Ctx); 50 | DECLARE_DELEGATE_RetVal_OneParam(EDcSerializePredicateResult, FDcSerializePredicate, FDcSerializeContext&); 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Serialize/DcSerializeUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/Misc/DcTypeUtils.h" 5 | #include "DataConfig/Property/DcPropertyUtils.h" 6 | #include "DataConfig/Serialize/DcSerializeTypes.h" 7 | 8 | struct FDcJsonWriterShared; 9 | 10 | namespace DcSerializeUtils 11 | { 12 | 13 | DATACONFIGCORE_API FDcResult RecursiveSerialize(FDcSerializeContext& Ctx); 14 | 15 | DATACONFIGCORE_API EDcSerializePredicateResult PredicateIsRootProperty(FDcSerializeContext& Ctx); 16 | 17 | struct DATACONFIGCORE_API FDcScopedTryUseJSONOverrideConfig 18 | { 19 | FDcJsonWriterShared* JsonWriterShared; 20 | bool bPrevUseOverrideConfig; 21 | 22 | FDcScopedTryUseJSONOverrideConfig(FDcWriter* Writer); 23 | ~FDcScopedTryUseJSONOverrideConfig(); 24 | }; 25 | 26 | } // namespace DcSerializeUtils 27 | 28 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Serialize/DcSerializer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/DcTypes.h" 5 | #include "DataConfig/Serialize/DcSerializeTypes.h" 6 | 7 | struct DATACONFIGCORE_API FDcSerializer : public FNoncopyable 8 | { 9 | FDcResult Serialize(FDcSerializeContext& Ctx); 10 | 11 | void AddDirectHandler(FFieldClass* PropertyClass, FDcSerializeDelegate&& Delegate); 12 | void AddDirectHandler(UClass* PropertyClass, FDcSerializeDelegate&& Delegate); 13 | void AddPredicatedHandler(FDcSerializePredicate&& Predicate, FDcSerializeDelegate&& Delegate, const FName Name = NAME_None); 14 | void AddStructHandler(UStruct* Struct, FDcSerializeDelegate&& Delegate); 15 | 16 | struct FPredicatedHandlerEntry 17 | { 18 | FDcSerializePredicate Predicate; 19 | FDcSerializeDelegate Handler; 20 | FName Name; 21 | }; 22 | TArray PredicatedSerializers; 23 | 24 | TMap UClassSerializerMap; 25 | TMap FieldClassSerializerMap; 26 | TMap StructSerializerMap; 27 | }; 28 | 29 | 30 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Serialize/DcSerializerSetup.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/Serialize/DcSerializeTypes.h" 5 | 6 | enum class EDcJsonSerializeType 7 | { 8 | Default, 9 | StringSoftLazy, // Serialize Soft/Lazy references as string 10 | }; 11 | 12 | DATACONFIGCORE_API void DcSetupJsonSerializeHandlers(FDcSerializer& Serializer, EDcJsonSerializeType Type = EDcJsonSerializeType::Default); 13 | 14 | DATACONFIGCORE_API void DcSetupPropertyPipeSerializeHandlers(FDcSerializer& Serializer); 15 | 16 | enum class EDcMsgPackSerializeType 17 | { 18 | Default, 19 | StringSoftLazy, // Serialize Soft/Lazy references as string 20 | InMemory, // Serialize pointer/enum/FName etc as underlying integer values 21 | }; 22 | 23 | DATACONFIGCORE_API void DcSetupMsgPackSerializeHandlers(FDcSerializer& Serializer, EDcMsgPackSerializeType Type = EDcMsgPackSerializeType::Default); 24 | 25 | DATACONFIGCORE_API void DcSetupCoreTypesSerializeHandlers(FDcSerializer& Serializer); 26 | 27 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Serialize/Handlers/Common/DcCoreTypesSerializers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/Serialize/DcSerializeTypes.h" 5 | 6 | namespace DcCoreTypesHandlers { 7 | 8 | DATACONFIGCORE_API FDcResult HandlerGuidSerialize(FDcSerializeContext& Ctx); 9 | DATACONFIGCORE_API FDcResult HandlerVector2fSerialize(FDcSerializeContext& Ctx); 10 | DATACONFIGCORE_API FDcResult HandlerVector3fSerialize(FDcSerializeContext& Ctx); 11 | DATACONFIGCORE_API FDcResult HandlerVector4fSerialize(FDcSerializeContext& Ctx); 12 | DATACONFIGCORE_API FDcResult HandlerMatrix44fSerialize(FDcSerializeContext& Ctx); 13 | DATACONFIGCORE_API FDcResult HandlerIntPointSerialize(FDcSerializeContext& Ctx); 14 | DATACONFIGCORE_API FDcResult HandlerIntVectorSerialize(FDcSerializeContext& Ctx); 15 | DATACONFIGCORE_API FDcResult HandlerColorSerialize(FDcSerializeContext& Ctx); 16 | DATACONFIGCORE_API FDcResult HandlerDateTimeSerialize(FDcSerializeContext& Ctx); 17 | DATACONFIGCORE_API FDcResult HandlerTimespanSerialize(FDcSerializeContext& Ctx); 18 | DATACONFIGCORE_API FDcResult HandlerTextSerialize(FDcSerializeContext& Ctx); 19 | 20 | #if ENGINE_MAJOR_VERSION == 5 21 | DATACONFIGCORE_API FDcResult HandlerVector2dSerialize(FDcSerializeContext& Ctx); 22 | DATACONFIGCORE_API FDcResult HandlerVector3dSerialize(FDcSerializeContext& Ctx); 23 | DATACONFIGCORE_API FDcResult HandlerVector4dSerialize(FDcSerializeContext& Ctx); 24 | DATACONFIGCORE_API FDcResult HandlerMatrix44dSerialize(FDcSerializeContext& Ctx); 25 | DATACONFIGCORE_API FDcResult HandlerIntVector4Serialize(FDcSerializeContext& Ctx); 26 | #endif // ENGINE_MAJOR_VERSION == 5 27 | 28 | } // namespace DcCommonHandlers 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Serialize/Handlers/Common/DcObjectSerializers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/Serialize/DcSerializeTypes.h" 5 | 6 | namespace DcCommonHandlers { 7 | 8 | /// Serializers that would all use a loaded, in memory `UObject*` even if it's Lazy/Soft/etc. 9 | DATACONFIGCORE_API FDcResult HandlerObjectReferenceSerialize(FDcSerializeContext& Ctx); 10 | DATACONFIGCORE_API FDcResult HandlerSoftObjectReferenceSerialize(FDcSerializeContext& Ctx); 11 | DATACONFIGCORE_API FDcResult HandlerWeakObjectReferenceSerialize(FDcSerializeContext& Ctx); 12 | DATACONFIGCORE_API FDcResult HandlerLazyObjectReferenceSerialize(FDcSerializeContext& Ctx); 13 | 14 | DATACONFIGCORE_API FDcResult HandlerClassReferenceSerialize(FDcSerializeContext& Ctx); 15 | DATACONFIGCORE_API FDcResult HandlerSoftClassReferenceSerialize(FDcSerializeContext& Ctx); 16 | 17 | /// Serialize Soft/Lazy as string, without loading actual object 18 | DATACONFIGCORE_API FDcResult HandlerSoftObjectToStringSerialize(FDcSerializeContext& Ctx); 19 | DATACONFIGCORE_API FDcResult HandlerLazyObjectToStringSerialize(FDcSerializeContext& Ctx); 20 | DATACONFIGCORE_API FDcResult HandlerSoftClassToStringSerialize(FDcSerializeContext& Ctx); 21 | 22 | DATACONFIGCORE_API EDcSerializePredicateResult PredicateIsSubObjectProperty(FDcSerializeContext& Ctx); 23 | DATACONFIGCORE_API FDcResult HandlerInstancedSubObjectSerialize(FDcSerializeContext& Ctx); 24 | 25 | 26 | } // namespace DcCommonHandlers 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Serialize/Handlers/MsgPack/DcMsgPackCommonSerializers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "CoreMinimal.h" 3 | #include "DataConfig/DcTypes.h" 4 | #include "DataConfig/Serialize/DcSerializeTypes.h" 5 | 6 | namespace DcMsgPackHandlers 7 | { 8 | 9 | DATACONFIGCORE_API FDcResult HandlerMapSerialize(FDcSerializeContext& Ctx); 10 | 11 | DATACONFIGCORE_API EDcSerializePredicateResult PredicateIsBlobProperty(FDcSerializeContext& Ctx); 12 | DATACONFIGCORE_API FDcResult HandlerBlobSerialize(FDcSerializeContext& Ctx); 13 | 14 | } // namespace DcMsgPackHandlers 15 | 16 | 17 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Serialize/Handlers/MsgPack/DcMsgPackTransientSerializers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "CoreMinimal.h" 3 | #include "DataConfig/DcTypes.h" 4 | #include "DataConfig/Serialize/DcSerializeTypes.h" 5 | 6 | namespace DcMsgPackHandlers 7 | { 8 | 9 | DATACONFIGCORE_API FDcResult HandlerTransientNameSerialize(FDcSerializeContext& Ctx); 10 | DATACONFIGCORE_API FDcResult HandlerTransientTextSerialize(FDcSerializeContext& Ctx); 11 | 12 | DATACONFIGCORE_API FDcResult HandlerTransientObjectSerialize(FDcSerializeContext& Ctx); 13 | DATACONFIGCORE_API FDcResult HandlerTransientClassSerialize(FDcSerializeContext& Ctx); 14 | 15 | DATACONFIGCORE_API FDcResult HandlerTransientSoftObjectSerialize(FDcSerializeContext& Ctx); 16 | DATACONFIGCORE_API FDcResult HandlerTransientSoftClassSerialize(FDcSerializeContext& Ctx); 17 | DATACONFIGCORE_API FDcResult HandlerTransientWeakObjectSerialize(FDcSerializeContext& Ctx); 18 | DATACONFIGCORE_API FDcResult HandlerTransientLazyObjectSerialize(FDcSerializeContext& Ctx); 19 | 20 | DATACONFIGCORE_API FDcResult HandlerTransientInterfaceSerialize(FDcSerializeContext& Ctx); 21 | 22 | DATACONFIGCORE_API FDcResult HandlerTransientDelegateSerialize(FDcSerializeContext& Ctx); 23 | DATACONFIGCORE_API FDcResult HandlerTransientMulticastInlineDelegateSerialize(FDcSerializeContext& Ctx); 24 | DATACONFIGCORE_API FDcResult HandlerTransientMulticastSparseDelegateSerialize(FDcSerializeContext& Ctx); 25 | 26 | DATACONFIGCORE_API FDcResult HandlerTransientFieldPathSerialize(FDcSerializeContext& Ctx); 27 | DATACONFIGCORE_API FDcResult HandlerTransientEnumSerialize(FDcSerializeContext& Ctx); 28 | 29 | 30 | } // namespace DcMsgPackHandlers 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Serialize/Handlers/Property/DcPropertyPipeSerializers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/DcTypes.h" 5 | #include "DataConfig/Serialize/DcSerializeTypes.h" 6 | 7 | namespace DcPropertyPipeHandlers { 8 | 9 | DATACONFIGCORE_API FDcResult HandlerSetSerialize(FDcSerializeContext& Ctx); 10 | DATACONFIGCORE_API FDcResult HandlerMapSerialize(FDcSerializeContext& Ctx); 11 | DATACONFIGCORE_API FDcResult HandlerStructSerialize(FDcSerializeContext& Ctx); 12 | DATACONFIGCORE_API FDcResult HandlerClassSerialize(FDcSerializeContext& Ctx); 13 | DATACONFIGCORE_API FDcResult HandlerOptionalSerialize(FDcSerializeContext& Ctx); 14 | 15 | } // namespace DcPropertyPipeHandlers 16 | 17 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Source/DcHighlightFormatter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DataConfig/Source/DcSourceTypes.h" 4 | #include "DataConfig/Source/DcSourceUtils.h" 5 | 6 | template 7 | struct THightlightFormatter 8 | { 9 | using SourceBuf = TDcSourceView; 10 | using SourceRef = TDcSourceRef; 11 | using SourceUtils = TDcCSourceUtils; 12 | 13 | static constexpr int _LINE_CONTEXT = 2; 14 | static constexpr int _LINE_MAX_LENGH = 140; 15 | 16 | SourceRef LinesBefore[_LINE_CONTEXT]; 17 | SourceRef LineHighlight; 18 | SourceRef LinesAfter[_LINE_CONTEXT]; 19 | 20 | FString FormatHighlight(SourceRef SpanRef, int Line = INDEX_NONE, FString* ReportFirstLine = nullptr); 21 | 22 | static SourceRef FindLine(const SourceRef& SpanRef); 23 | static int FindLineNumber(const SourceRef& SpanRef); 24 | static FString FormatDiagnosticLine(const FString& InLine); 25 | }; 26 | 27 | 28 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Source/DcSourceTypes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "HAL/Platform.h" 4 | #include "Misc/CString.h" 5 | #include "DataConfig/DcTypes.h" 6 | 7 | struct DATACONFIGCORE_API FDcSourceLocation 8 | { 9 | uint32 Line; 10 | uint32 Column; 11 | }; 12 | 13 | 14 | template 15 | struct TDcSourceView 16 | { 17 | using TCharType = CharType; 18 | 19 | const CharType* Buffer = nullptr; 20 | int32 Num = 0; 21 | 22 | TDcSourceView() = default; 23 | TDcSourceView(const TDcSourceView&) = default; 24 | 25 | TDcSourceView(const CharType* InPtr) 26 | { 27 | Buffer = InPtr; 28 | Num = TCString::Strlen(InPtr); 29 | } 30 | 31 | TDcSourceView(const CharType* InPtr, int32 InNum) 32 | { 33 | Buffer = InPtr; 34 | Num = InNum; 35 | } 36 | 37 | FORCEINLINE CharType Get(int32 Ix) const 38 | { 39 | check(Ix >= 0 && Ix < Num); 40 | return Buffer[Ix]; 41 | } 42 | }; 43 | 44 | template 45 | struct TDcSourceRef 46 | { 47 | using TCharType = CharType; 48 | 49 | const TDcSourceView* Buffer = nullptr; 50 | 51 | int32 Begin; 52 | int32 Num; 53 | 54 | FString CharsToString() const; 55 | 56 | bool IsValid() const; 57 | void Reset(); 58 | const CharType* GetBeginPtr() const; 59 | }; 60 | 61 | #include "DataConfig/Source/DcSourceTypes.inl" 62 | 63 | using FDcAnsiSourceBuffer = TDcSourceView; 64 | using FDcSourceBuffer = TDcSourceView; 65 | 66 | using FDcAnsiSourceRef = TDcSourceRef; 67 | using FDcSourceRef = TDcSourceRef; 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigCore/Public/DataConfig/Source/DcSourceTypes.inl: -------------------------------------------------------------------------------- 1 | 2 | template 3 | FString TDcSourceRef::CharsToString() const 4 | { 5 | // ! note that this would convert non ascii UTF8 code points to `?` 6 | return IsValid() 7 | ? FString(Num, Buffer->Buffer + Begin) 8 | : TEXT(""); 9 | } 10 | 11 | template 12 | bool TDcSourceRef::IsValid() const 13 | { 14 | return Buffer != nullptr 15 | && Begin >= 0 16 | && Begin + Num <= Buffer->Num; 17 | } 18 | 19 | template 20 | const CharType* TDcSourceRef::GetBeginPtr() const 21 | { 22 | if (!IsValid()) 23 | { 24 | return nullptr; 25 | } 26 | else 27 | { 28 | return Buffer->Buffer + Begin; 29 | } 30 | } 31 | 32 | template 33 | void TDcSourceRef::Reset() 34 | { 35 | Buffer = nullptr; 36 | } 37 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEditorExtra/DataConfigEditorExtra.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | 3 | public class DataConfigEditorExtra : ModuleRules 4 | { 5 | public DataConfigEditorExtra(ReadOnlyTargetRules Target) : base(Target) 6 | { 7 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 8 | 9 | PublicDependencyModuleNames.AddRange(new string[] { 10 | "Core", 11 | "CoreUObject", 12 | "Engine", 13 | "UnrealEd", 14 | "DesktopPlatform", 15 | "GameplayTags", 16 | "GameplayAbilities", 17 | "DataConfigCore", 18 | "DataConfigExtra", 19 | "DataConfigEngineExtra", 20 | }); 21 | 22 | PrivateDependencyModuleNames.AddRange(new string[] { 23 | "Slate", 24 | "SlateCore", 25 | "ToolMenus", 26 | "Kismet", 27 | "KismetCompiler", 28 | "MessageLog", 29 | }); 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEditorExtra/Private/DataConfig/EditorExtra/Diagnostic/DcDiagnosticEditorExtra.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/EditorExtra/Diagnostic/DcDiagnosticEditorExtra.h" 2 | #include "DataConfig/Diagnostic/DcDiagnostic.h" 3 | 4 | namespace DcDEditorExtra 5 | { 6 | 7 | static FDcDiagnosticDetail _Details[] = { 8 | { InvalidGameplayAttribute, TEXT("Invalid GameplayAttribute String, Actual: '{0}"), }, 9 | { KismetCompileFail, TEXT("Kismet compile blueprint fail: Blueprint '{0}'"), }, 10 | { LoadFileByPathFail, TEXT("Load file failed, Path: '{0}'"), }, 11 | }; 12 | 13 | FDcDiagnosticGroup Details = { 14 | DcDEditorExtra::Category, 15 | DcDimOf(_Details), 16 | _Details 17 | }; 18 | 19 | 20 | } // namespace DcDEditorExtra 21 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEditorExtra/Private/DataConfig/EditorExtra/Tests/DcCoreTestsCommandlet.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/EditorExtra/Tests/DcCoreTestsCommandlet.h" 2 | #include "DataConfig/DcTypes.h" 3 | #include "DataConfig/Automation/DcAutomation.h" 4 | 5 | UDcCoreTestsCommandlet::UDcCoreTestsCommandlet() 6 | { 7 | IsClient = false; 8 | IsServer = false; 9 | IsEditor = true; 10 | LogToConsole = true; 11 | } 12 | 13 | int32 UDcCoreTestsCommandlet::Main(const FString& Params) 14 | { 15 | UE_SET_LOG_VERBOSITY(LogDataConfigCore, Display); 16 | 17 | UE_LOG(LogDataConfigCore, Display, TEXT("=================================================================")); 18 | 19 | TArray Tokens; 20 | TArray Switches; 21 | UCommandlet::ParseCommandLine(*Params, Tokens, Switches); 22 | Tokens.RemoveAt(0); // 0 is always commandlet name 23 | 24 | FDcAutomationConsoleRunner Runner; 25 | Runner.Prepare(FDcAutomationConsoleRunner::FromCommandlineTokens(Tokens)); 26 | int32 Ret = Runner.RunTests(); 27 | 28 | UE_LOG(LogDataConfigCore, Display, TEXT("=================================================================")); 29 | 30 | return Ret; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEditorExtra/Private/DataConfig/EditorExtra/Tests/DcTestSerDeEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "Engine/DataAsset.h" 5 | #include "DataConfig/Extra/DcExtraCommon.h" 6 | #include "DcTestSerDeEditor.generated.h" 7 | 8 | UCLASS() 9 | class DATACONFIGEDITOREXTRA_API UDcEditorExtraNativeDataAsset : public UDataAsset 10 | { 11 | GENERATED_BODY() 12 | 13 | public: 14 | 15 | UPROPERTY() FString StrField; 16 | UPROPERTY() int IntField = 0; 17 | }; 18 | 19 | USTRUCT() 20 | struct FDcEditorExtraTestObjectRefs1 21 | { 22 | GENERATED_BODY() 23 | DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcEditorExtraTestObjectRefs1) 24 | 25 | UPROPERTY() UObject* ObjField1; 26 | UPROPERTY() UObject* ObjField2; 27 | UPROPERTY() UObject* ObjField3; 28 | UPROPERTY() UObject* ObjField4; 29 | }; 30 | 31 | 32 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEditorExtra/Private/DataConfig/EditorExtra/Tests/DcTestSerializeEditor.cpp: -------------------------------------------------------------------------------- 1 | #include "DcTestSerDeEditor.h" 2 | #include "DataConfig/Serialize/DcSerializer.h" 3 | #include "DataConfig/Automation/DcAutomation.h" 4 | #include "DataConfig/Automation/DcAutomationUtils.h" 5 | #include "DataConfig/Extra/Misc/DcTestCommon.h" 6 | #include "DataConfig/Json/DcJsonWriter.h" 7 | 8 | DC_TEST("DataConfig.EditorExtra.Serialize.ObjectReference2") 9 | { 10 | FDcEditorExtraTestObjectRefs1 Value; 11 | 12 | UDcEditorExtraNativeDataAsset* DataAsset = Cast(StaticLoadObject( 13 | UDcEditorExtraNativeDataAsset::StaticClass(), 14 | nullptr, 15 | TEXT("/DataConfig/DcFixture/DcTestNativeDataAssetAlpha"), 16 | nullptr 17 | )); 18 | 19 | Value.ObjField1 = DataAsset; 20 | Value.ObjField2 = nullptr; 21 | Value.ObjField3 = nullptr; 22 | Value.ObjField4 = nullptr; 23 | 24 | FDcPropertyDatum Datum(&Value); 25 | FDcJsonWriter Writer; 26 | 27 | FString ExpectStr = DcAutomationUtils::DcReindentStringLiteral(TEXT(R"( 28 | 29 | { 30 | "ObjField1" : "DcEditorExtraNativeDataAsset'/DataConfig/DcFixture/DcTestNativeDataAssetAlpha.DcTestNativeDataAssetAlpha'", 31 | "ObjField2" : null, 32 | "ObjField3" : null, 33 | "ObjField4" : null 34 | } 35 | 36 | )")); 37 | 38 | UTEST_OK("Serialize FDcEditorExtraTestObjectRefs1 into Json", DcAutomationUtils::SerializeInto(&Writer, Datum)); 39 | Writer.Sb << TCHAR('\n'); 40 | UTEST_EQUAL("Serialize FDcEditorExtraTestObjectRefs1 into Json", Writer.Sb.ToString(), ExpectStr); 41 | 42 | return true; 43 | } 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEditorExtra/Public/DataConfig/EditorExtra/Diagnostic/DcDiagnosticEditorExtra.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "HAL/Platform.h" 4 | #include "DataConfig/Diagnostic/DcDiagnostic.h" 5 | 6 | // TODO do a pass on this, likely no need for this at all 7 | /// Editor Extra diagnostic 8 | 9 | namespace DcDEditorExtra 10 | { 11 | 12 | static const uint16 Category = 0xF002; 13 | 14 | enum Type : uint16 15 | { 16 | Unknown = 0, 17 | // Gameplay Ability 18 | InvalidGameplayAttribute, 19 | KismetCompileFail, 20 | // IO 21 | LoadFileByPathFail, 22 | }; 23 | 24 | extern DATACONFIGEDITOREXTRA_API FDcDiagnosticGroup Details; 25 | 26 | } // namespace DcDEditorExtra 27 | 28 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEditorExtra/Public/DataConfig/EditorExtra/Editor/DcEditorDumpAssetToLog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "Misc/EngineVersionComparison.h" 5 | 6 | #if UE_VERSION_OLDER_THAN(5, 1, 0) 7 | #include "AssetData.h" 8 | #else 9 | #include "AssetRegistry/AssetData.h" 10 | #endif 11 | 12 | class FExtender; 13 | 14 | namespace DcEditorExtra 15 | { 16 | 17 | DATACONFIGEDITOREXTRA_API TSharedRef DumpAssetToLogExtender(const TArray& SelectedAssets); 18 | 19 | } // namespace DcEditorExtra 20 | 21 | 22 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEditorExtra/Public/DataConfig/EditorExtra/Tests/DcCoreTestsCommandlet.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "Commandlets/Commandlet.h" 5 | #include "DcCoreTestsCommandlet.generated.h" 6 | 7 | UCLASS() 8 | class UDcCoreTestsCommandlet : public UCommandlet 9 | { 10 | GENERATED_BODY() 11 | 12 | public: 13 | 14 | UDcCoreTestsCommandlet(); 15 | 16 | private: 17 | 18 | int32 Main(const FString& Params) override; 19 | }; 20 | 21 | 22 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEditorExtra/Public/DcEditorExtraModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "Modules/ModuleManager.h" 5 | #include "Modules/ModuleInterface.h" 6 | #include "Commandlets/Commandlet.h" 7 | #include "DcEditorExtraModule.generated.h" 8 | 9 | class FAssetTypeActions_Base; 10 | 11 | class FDcEditorExtraModule : public IModuleInterface 12 | { 13 | public: 14 | FORCEINLINE static FDcEditorExtraModule& Get() 15 | { 16 | return FModuleManager::LoadModuleChecked("DataConfigEditorExtra"); 17 | } 18 | 19 | FORCEINLINE static bool IsAvailable() 20 | { 21 | return FModuleManager::Get().IsModuleLoaded("DataConfigEditorExtra"); 22 | } 23 | 24 | virtual void StartupModule() override; 25 | virtual void ShutdownModule() override; 26 | 27 | TArray>> AssetActions; 28 | TArray ContentExplorerExtenderHandlers; 29 | }; 30 | 31 | UCLASS() 32 | class UDcEditorExtraTestsCommandlet : public UCommandlet 33 | { 34 | GENERATED_BODY() 35 | 36 | public: 37 | 38 | UDcEditorExtraTestsCommandlet(); 39 | 40 | private: 41 | 42 | int32 Main(const FString& Params) override; 43 | }; 44 | 45 | 46 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEngineExtra/DataConfigEngineExtra.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | 3 | public class DataConfigEngineExtra : ModuleRules 4 | { 5 | public DataConfigEngineExtra(ReadOnlyTargetRules Target) : base(Target) 6 | { 7 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 8 | 9 | PublicDependencyModuleNames.AddRange(new string[] { 10 | "Core", 11 | "CoreUObject", 12 | "Engine", 13 | "GameplayTags", 14 | "GameplayAbilities", 15 | "DataConfigCore", 16 | "DataConfigExtra", 17 | #if UE_5_0_OR_LATER 18 | "DataConfigEngineExtra5", 19 | 20 | #if UE_5_5_OR_LATER 21 | // pass 22 | #else 23 | "StructUtils", 24 | #endif // UE_5_5_OR_LATER 25 | #endif // UE_5_0_OR_LATER 26 | }); 27 | 28 | if (Target.bBuildEditor == true) 29 | { 30 | PrivateDependencyModuleNames.AddRange( 31 | new string[] 32 | { 33 | "UnrealEd", 34 | } 35 | ); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEngineExtra/Private/DataConfig/EngineExtra/Diagnostic/DcDiagnosticEngineExtra.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/EngineExtra/Diagnostic/DcDiagnosticEngineExtra.h" 2 | #include "DataConfig/Diagnostic/DcDiagnostic.h" 3 | 4 | namespace DcDEngineExtra 5 | { 6 | 7 | static FDcDiagnosticDetail _Details[] = { 8 | { InvalidGameplayTagString, TEXT("Invalid Gameplay Tag String, Actual: '{0}'"), }, 9 | { InvalidGameplayTagStringFixErr, TEXT("Invalid Gameplay Tag String, Actual: '{0}', Fixed: '{1}', Error: '{2}'"), }, 10 | { ExpectBlueprintOrClass, TEXT("Expecting Blueprint or UClass, found: {0}"), }, 11 | }; 12 | 13 | FDcDiagnosticGroup Details = { 14 | DcDEngineExtra::Category, 15 | DcDimOf(_Details), 16 | _Details 17 | }; 18 | 19 | 20 | } // namespace DcDEngineExtra 21 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEngineExtra/Private/DcEngineExtraModule.cpp: -------------------------------------------------------------------------------- 1 | #include "DcEngineExtraModule.h" 2 | 3 | #include "GameplayTagsManager.h" 4 | 5 | #include "DataConfig/DcEnv.h" 6 | #include "DataConfig/Extra/Diagnostic/DcDiagnosticExtra.h" 7 | #include "DataConfig/EngineExtra/Diagnostic/DcDiagnosticEngineExtra.h" 8 | 9 | static void _PopulateEngineExtraGameplayTagFixtures() 10 | { 11 | UGameplayTagsManager::Get().AddNativeGameplayTag(TEXT("DataConfig.Foo.Bar")); 12 | UGameplayTagsManager::Get().AddNativeGameplayTag(TEXT("DataConfig.Foo.Bar.Baz")); 13 | UGameplayTagsManager::Get().AddNativeGameplayTag(TEXT("DataConfig.Tar.Taz")); 14 | } 15 | 16 | void FDcEngineExtraModule::StartupModule() 17 | { 18 | UE_LOG(LogDataConfigCore, Log, TEXT("DcEngineExtraModule module starting up")); 19 | DcRegisterDiagnosticGroup(&DcDExtra::Details); 20 | DcRegisterDiagnosticGroup(&DcDEngineExtra::Details); 21 | 22 | _PopulateEngineExtraGameplayTagFixtures(); 23 | 24 | DcStartUp(EDcInitializeAction::Minimal); 25 | } 26 | 27 | void FDcEngineExtraModule::ShutdownModule() 28 | { 29 | UE_LOG(LogDataConfigCore, Log, TEXT("DcEngineExtraModule module shutting down")); 30 | 31 | DcShutDown(); 32 | } 33 | 34 | IMPLEMENT_MODULE(FDcEngineExtraModule, DataConfigEngineExtra); 35 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEngineExtra/Public/DataConfig/EngineExtra/Diagnostic/DcDiagnosticEngineExtra.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "HAL/Platform.h" 4 | #include "DataConfig/Diagnostic/DcDiagnostic.h" 5 | 6 | /// Engine Extra diagnostic 7 | 8 | namespace DcDEngineExtra 9 | { 10 | 11 | static const uint16 Category = 0xF003; 12 | 13 | enum Type : uint16 14 | { 15 | Unknown = 0, 16 | // Gameplay Tag 17 | InvalidGameplayTagString, 18 | InvalidGameplayTagStringFixErr, 19 | // BP Class 20 | ExpectBlueprintOrClass, 21 | }; 22 | 23 | extern DATACONFIGENGINEEXTRA_API FDcDiagnosticGroup Details; 24 | 25 | } // namespace DcDEngineExtra 26 | 27 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEngineExtra/Public/DataConfig/EngineExtra/SerDe/DcSerDeGameplayTags.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameplayTags.h" 4 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 5 | #include "DataConfig/Serialize/DcSerializeTypes.h" 6 | #include "DcSerDeGameplayTags.generated.h" 7 | 8 | /// GameplayTag and GameplayTagContainer SerDe 9 | 10 | namespace DcEngineExtra { 11 | 12 | DATACONFIGENGINEEXTRA_API FDcResult HandlerGameplayTagDeserialize(FDcDeserializeContext& Ctx); 13 | DATACONFIGENGINEEXTRA_API FDcResult HandlerGameplayTagContainerDeserialize(FDcDeserializeContext& Ctx); 14 | 15 | DATACONFIGENGINEEXTRA_API FDcResult HandlerGameplayTagSerialize(FDcSerializeContext& Ctx); 16 | DATACONFIGENGINEEXTRA_API FDcResult HandlerGameplayTagContainerSerialize(FDcSerializeContext& Ctx); 17 | 18 | 19 | } // namespace DcEngineExtra 20 | 21 | USTRUCT() 22 | struct FDcEngineExtraTestStructWithGameplayTag1 23 | { 24 | GENERATED_BODY() 25 | 26 | UPROPERTY() FGameplayTag TagField1; 27 | UPROPERTY() FGameplayTag TagField2; 28 | 29 | }; 30 | 31 | USTRUCT() 32 | struct FDcEngineExtraTestStructWithGameplayTag2 33 | { 34 | GENERATED_BODY() 35 | 36 | UPROPERTY() FGameplayTagContainer TagContainerField1; 37 | UPROPERTY() FGameplayTagContainer TagContainerField2; 38 | }; 39 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEngineExtra/Public/DataConfig/EngineExtra/Types/DcEngineExtraTestFixtures.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/Extra/Types/DcExtraTestFixtures.h" 5 | #include "DcEngineExtraTestFixtures.generated.h" 6 | 7 | UCLASS() 8 | class UDcEngineExtraInstancedObjectDataAsset : public UPrimaryDataAsset 9 | { 10 | GENERATED_BODY() 11 | public: 12 | 13 | UPROPERTY(EditAnywhere, Instanced) 14 | UDcBaseShape* ShapeField1; 15 | 16 | UPROPERTY(EditAnywhere, Instanced) 17 | UDcBaseShape* ShapeField2; 18 | }; 19 | 20 | 21 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEngineExtra/Public/DcEngineExtraModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "Modules/ModuleManager.h" 5 | #include "Modules/ModuleInterface.h" 6 | 7 | class FDcEngineExtraModule : public IModuleInterface 8 | { 9 | public: 10 | FORCEINLINE static FDcEngineExtraModule& Get() 11 | { 12 | return FModuleManager::LoadModuleChecked("DataConfigEngineExtra"); 13 | } 14 | 15 | FORCEINLINE static bool IsAvailable() 16 | { 17 | return FModuleManager::Get().IsModuleLoaded("DataConfigEngineExtra"); 18 | } 19 | 20 | virtual void StartupModule() override; 21 | virtual void ShutdownModule() override; 22 | }; 23 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEngineExtra5/DataConfigEngineExtra5.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | 3 | public class DataConfigEngineExtra5 : ModuleRules 4 | { 5 | public DataConfigEngineExtra5(ReadOnlyTargetRules Target) : base(Target) 6 | { 7 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 8 | 9 | PublicDependencyModuleNames.AddRange(new string[] { 10 | "Core", 11 | "CoreUObject", 12 | "Engine", 13 | "DataConfigCore", 14 | "DataConfigExtra", 15 | #if UE_5_5_OR_LATER 16 | // pass 17 | #else 18 | "StructUtils", 19 | #endif // UE_5_5_OR_LATER 20 | }); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEngineExtra5/Private/DcEngineExtra5Module.cpp: -------------------------------------------------------------------------------- 1 | #include "DcEngineExtra5Module.h" 2 | #include "DataConfig/DcTypes.h" 3 | 4 | void FDcEngineExtra5Module::StartupModule() 5 | { 6 | UE_LOG(LogDataConfigCore, Log, TEXT("DataConfigEngineExtra5 module starting up")); 7 | } 8 | 9 | void FDcEngineExtra5Module::ShutdownModule() 10 | { 11 | UE_LOG(LogDataConfigCore, Log, TEXT("DataConfigEngineExtra5 module shutting down")); 12 | } 13 | 14 | IMPLEMENT_MODULE(FDcEngineExtra5Module, DataConfigEngineExtra5); 15 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigEngineExtra5/Public/DcEngineExtra5Module.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "Modules/ModuleManager.h" 5 | #include "Modules/ModuleInterface.h" 6 | 7 | class FDcEngineExtra5Module : public IModuleInterface 8 | { 9 | public: 10 | FORCEINLINE static FDcEngineExtra5Module& Get() 11 | { 12 | return FModuleManager::LoadModuleChecked("DataConfigEngineExtra5"); 13 | } 14 | 15 | FORCEINLINE static bool IsAvailable() 16 | { 17 | return FModuleManager::Get().IsModuleLoaded("DataConfigEngineExtra5"); 18 | } 19 | 20 | virtual void StartupModule() override; 21 | virtual void ShutdownModule() override; 22 | }; 23 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/DataConfigExtra.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | 3 | public class DataConfigExtra : ModuleRules 4 | { 5 | public DataConfigExtra(ReadOnlyTargetRules Target) : base(Target) 6 | { 7 | bRequiresImplementModule = false; 8 | Type = ModuleType.CPlusPlus; 9 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicDependencyModuleNames.AddRange( 12 | new string[] { 13 | "DataConfigCore", 14 | "Core", 15 | "CoreUObject", 16 | "PropertyPath", 17 | "Json", 18 | "JsonUtilities", 19 | "Projects", 20 | "SQLiteCore", 21 | }); 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Private/DataConfig/Extra/DcExtraModule.cpp: -------------------------------------------------------------------------------- 1 | #include "CoreMinimal.h" 2 | #include "Modules/ModuleInterface.h" 3 | #include "Modules/ModuleManager.h" 4 | #include "DataConfig/DcTypes.h" 5 | 6 | class FDcExtraModule : public IModuleInterface 7 | { 8 | public: 9 | FORCEINLINE static FDcExtraModule& Get() 10 | { 11 | return FModuleManager::LoadModuleChecked("DataConfigExtra"); 12 | } 13 | 14 | FORCEINLINE static bool IsAvailable() 15 | { 16 | return FModuleManager::Get().IsModuleLoaded("DataConfigExtra"); 17 | } 18 | 19 | void StartupModule() override 20 | { 21 | UE_LOG(LogDataConfigCore, Log, TEXT("DcExtraModule module starting up")); 22 | } 23 | 24 | void ShutdownModule() override 25 | { 26 | UE_LOG(LogDataConfigCore, Log, TEXT("DcExtraModule module starting up")); 27 | } 28 | }; 29 | 30 | IMPLEMENT_MODULE(FDcExtraModule, DataConfigExtra); 31 | 32 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Private/DataConfig/Extra/Diagnostic/DcDiagnosticExtra.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Extra/Diagnostic/DcDiagnosticExtra.h" 2 | #include "DataConfig/Diagnostic/DcDiagnostic.h" 3 | 4 | namespace DcDExtra 5 | { 6 | 7 | static FDcDiagnosticDetail _ExtraDetails[] = { 8 | { InvalidBase64String, TEXT("Invalid Base64 string failed to convert to blob"), }, 9 | { ExpectClassExpand, TEXT("Expect read class control to be 'ExpandObject'. Remember to force expand from Config"), }, 10 | 11 | // Sqlite 12 | { SqliteLastError, TEXT("Sqlite last error: '{0}'"), }, 13 | { SqliteBusy, TEXT("Sqlite busy"), }, 14 | 15 | // InlineStruct 16 | { InlineStructTooBig, TEXT("Inline struct too big: BufSize '{0}', Struct '{1}' Size '{2}'"), }, 17 | { InlineStructNotSet, TEXT("Inline struct not set"), }, 18 | 19 | // Nested 20 | { NestedMissingMetaData, TEXT("Nested missing metadata: '{0}'"), }, 21 | { NestedGrid2DHeightMismatch, TEXT("Nested Grid2D height mismatch, Expect '{0}'"), }, 22 | { NestedGrid2DWidthMismatch, TEXT("Nested Grid2D width mismatch, Expect '{0}'"), }, 23 | { NestedGrid2DLenMismatch, TEXT("Nested Grid2D total length mismatch, Expect '{0}', Actual: '{1}'"), }, 24 | }; 25 | 26 | FDcDiagnosticGroup Details = { 27 | DcDExtra::Category, 28 | DcDimOf(_ExtraDetails), 29 | _ExtraDetails 30 | }; 31 | 32 | 33 | } // namespace DcDExtra 34 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Private/DataConfig/Extra/Types/DcAnyStruct.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Extra/Types/DcAnyStruct.h" 2 | #include "DataConfig/Property/DcPropertyDatum.h" 3 | #include "DataConfig/Automation/DcAutomationUtils.h" 4 | 5 | void FDcAnyStruct::AnyStructReferenceController::DestroyObject() 6 | { 7 | // handle delete nullptr, which is valid 8 | if (DataPtr == nullptr) 9 | { 10 | check(StructClass == nullptr); 11 | return; 12 | } 13 | 14 | StructClass->DestroyStruct(DataPtr); 15 | FMemory::Free(DataPtr); 16 | } 17 | 18 | void FDcAnyStruct::DebugDump() 19 | { 20 | FString Dumped = DcAutomationUtils::DumpFormat(FDcPropertyDatum(StructClass, DataPtr)); 21 | FPlatformMisc::LowLevelOutputDebugString(*Dumped); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Private/DataConfig/Extra/Types/DcExtraTestFixtures.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Extra/Types/DcExtraTestFixtures.h" 2 | 3 | void FDcExtraCoreTypesStruct::MakeFixture() 4 | { 5 | GuidField1 = FGuid(1,2,3,4); 6 | GuidField2 = FGuid(0,0,0,0); 7 | 8 | Vec2Field1 = {0, 1}; 9 | Vec2Field2 = FVector2D::ZeroVector; 10 | 11 | VecField1 = FVector::UpVector; 12 | VecField2 = FVector::ZeroVector; 13 | 14 | PlaneField1 = {1,2,3,4}; 15 | PlaneField2 = {0,0,0,0}; 16 | 17 | MatrixField1 = FMatrix::Identity; 18 | MatrixField2 = FMatrix{ForceInitToZero}; 19 | 20 | RotatorField1 = FRotator(1, 2, 3); 21 | RotatorField2 = FRotator::ZeroRotator; 22 | 23 | QuatField1 = FQuat(1, 2, 3, 4); 24 | QuatField2 = FQuat(0, 0, 0, 0); 25 | 26 | TransformField1 = FTransform::Identity; 27 | TransformField2 = FTransform(FQuat::Identity, FVector(1,2,3), FVector::OneVector); 28 | 29 | ColorField1 = FColor::Black; 30 | ColorField2 = FColor::Blue; 31 | 32 | LinearColorField1 = FLinearColor::Black; 33 | LinearColorField2 = FLinearColor::White; 34 | 35 | IntPointField1 = FIntPoint(1, 2); 36 | IntPointField2 = FIntPoint(0, 0); 37 | 38 | IntVectorField1 = FIntVector(1, 2, 3); 39 | IntVectorField2 = FIntVector::ZeroValue; 40 | 41 | DateTimeField1 = FDateTime(0); 42 | DateTimeField2 = FDateTime(1988, 7, 23); 43 | 44 | TimespanField1 = FTimespan(0); 45 | TimespanField2 = FTimespan(5, 6, 7, 8); 46 | } 47 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Private/DataConfig/Extra/Types/DcInlineStruct.cpp: -------------------------------------------------------------------------------- 1 | #include "DataConfig/Extra/Types/DcInlineStruct.h" 2 | 3 | template struct DATACONFIGEXTRA_API TDcInlineStructBase<64>; 4 | template struct DATACONFIGEXTRA_API TDcInlineStructBase<128>; 5 | template struct DATACONFIGEXTRA_API TDcInlineStructBase<256>; 6 | template struct DATACONFIGEXTRA_API TDcInlineStructBase<512>; 7 | 8 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/DcExtraCommon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "HAL/UnrealMemory.h" 4 | 5 | // UE checks uninitialized UPROPERTY() and reports warning on debug builds. 6 | // The check can be manually invoked with `CoreUObject.AttemptToFindUninitializedScriptStructMembers` 7 | // use this to generate a zeroinit constructor 8 | #define DCEXTRA_ZEROINIT_CONSTRUCTOR(ClassName) \ 9 | ClassName() { FMemory::Memzero(this, sizeof(ClassName)); } -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/Diagnostic/DcDiagnosticExtra.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "HAL/Platform.h" 4 | #include "DataConfig/Diagnostic/DcDiagnostic.h" 5 | 6 | /// Extra diagnostic 7 | 8 | namespace DcDExtra 9 | { 10 | 11 | static const uint16 Category = 0xF001; 12 | 13 | enum Type : uint16 14 | { 15 | Unknown = 0, 16 | InvalidBase64String, 17 | ExpectClassExpand, 18 | 19 | // Sqlite 20 | SqliteLastError, 21 | SqliteBusy, 22 | 23 | // InlineStruct 24 | InlineStructTooBig, 25 | InlineStructNotSet, 26 | 27 | // Nested 28 | NestedMissingMetaData, 29 | NestedGrid2DHeightMismatch, 30 | NestedGrid2DWidthMismatch, 31 | NestedGrid2DLenMismatch, 32 | 33 | }; 34 | 35 | extern DATACONFIGEXTRA_API FDcDiagnosticGroup Details; 36 | 37 | } // namespace DcDExtra 38 | 39 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/Misc/DcBench.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | 5 | struct FDcBenchRunResult 6 | { 7 | TArray Ticks; 8 | bool bAllOk; 9 | }; 10 | 11 | DATACONFIGEXTRA_API FDcBenchRunResult DcBenchRun(int Iterations, TFunctionRef Body); 12 | 13 | struct FDcBenchStat 14 | { 15 | float MeanMs; 16 | float MedianMs; 17 | float Deviation; 18 | 19 | bool bAllOk; 20 | }; 21 | 22 | DATACONFIGEXTRA_API FDcBenchStat DcBenchStats(TFunctionRef Body); 23 | 24 | DATACONFIGEXTRA_API FString DcFormatBenchStats(FString Prefix, double BytesCount, FDcBenchStat Stat); 25 | 26 | DATACONFIGEXTRA_API FString DcBuildConfigurationString(); 27 | 28 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/Misc/DcNDJSON.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /// NDJSON examples 4 | #include "DataConfig/DcTypes.h" 5 | #include "DataConfig/Property/DcPropertyDatum.h" 6 | #include "DataConfig/Property/DcPropertyUtils.h" 7 | 8 | namespace DcExtra 9 | { 10 | 11 | DATACONFIGEXTRA_API FDcResult LoadNDJSON(const TCHAR* Str, FDcPropertyDatum Datum); 12 | 13 | template 14 | DATACONFIGEXTRA_API FDcResult LoadNDJSON(const TCHAR* Str, TArray& Arr) 15 | { 16 | using namespace DcPropertyUtils; 17 | auto ArrProp = FDcPropertyBuilder::Array( 18 | FDcPropertyBuilder::Struct(TBaseStructure::Get()) 19 | ).LinkOnScope(); 20 | 21 | return LoadNDJSON(Str, FDcPropertyDatum(ArrProp.Get(), &Arr)); 22 | } 23 | 24 | DATACONFIGEXTRA_API FDcResult SaveNDJSON(FDcPropertyDatum Datum, FString& OutStr); 25 | 26 | template 27 | DATACONFIGEXTRA_API FDcResult SaveNDJSON(const TArray& Arr, FString& OutStr) 28 | { 29 | using namespace DcPropertyUtils; 30 | auto ArrProp = FDcPropertyBuilder::Array( 31 | FDcPropertyBuilder::Struct(TBaseStructure::Get()) 32 | ).LinkOnScope(); 33 | 34 | return SaveNDJSON(FDcPropertyDatum(ArrProp.Get(), (void*)&Arr), OutStr); 35 | } 36 | 37 | } // namespace DcExtra 38 | 39 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/Misc/DcSqlite.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DataConfig/DcTypes.h" 4 | #include "DataConfig/Property/DcPropertyDatum.h" 5 | #include "DataConfig/Property/DcPropertyUtils.h" 6 | #include "DcSqlite.generated.h" 7 | 8 | class FSQLiteDatabase; 9 | 10 | namespace DcExtra 11 | { 12 | 13 | /// Load array of struct from Sqlite query 14 | FDcResult LoadStructArrayFromSQLite(FSQLiteDatabase* Db, const TCHAR* Query, FDcPropertyDatum Datum); 15 | 16 | template 17 | FDcResult LoadStructArrayFromSQLite(FSQLiteDatabase* Db, const TCHAR* Query, TArray& Arr) 18 | { 19 | using namespace DcPropertyUtils; 20 | auto ArrProp = FDcPropertyBuilder::Array( 21 | FDcPropertyBuilder::Struct(TBaseStructure::Get()) 22 | ).LinkOnScope(); 23 | 24 | return LoadStructArrayFromSQLite(Db, Query, FDcPropertyDatum(ArrProp.Get(), &Arr)); 25 | } 26 | 27 | } // namespace DcExtra 28 | 29 | USTRUCT() 30 | struct FDcExtraTestUser 31 | { 32 | GENERATED_BODY() 33 | 34 | UPROPERTY() int Id = 0; 35 | UPROPERTY() FString Name; 36 | UPROPERTY() FName Title; 37 | }; 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/Misc/DcTestCommon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/DcTypes.h" 5 | #include "DataConfig/Property/DcPropertyDatum.h" 6 | #include "DataConfig/Property/DcPropertyReader.h" 7 | #include "DataConfig/Property/DcPropertyWriter.h" 8 | #include "DataConfig/Misc/DcPipeVisitor.h" 9 | #include "DataConfig/Writer/DcNoopWriter.h" 10 | #include "DataConfig/Writer/DcPrettyPrintWriter.h" 11 | 12 | class FAutomationTestBase; 13 | 14 | FORCEINLINE FDcResult DcPropertyPipeVisit(FDcPropertyReader& Reader, FDcPropertyWriter& Writer) 15 | { 16 | FDcPipeVisitor RoundtripVisit(&Reader, &Writer); 17 | return RoundtripVisit.PipeVisit(); 18 | } 19 | 20 | FORCEINLINE FDcResult DcPropertyPipeVisit(FDcPropertyDatum FromDatum, FDcPropertyDatum ToDatum) 21 | { 22 | FDcPropertyReader Reader(FromDatum); 23 | FDcPropertyWriter Writer(ToDatum); 24 | return DcPropertyPipeVisit(Reader, Writer); 25 | } 26 | 27 | FORCEINLINE FDcResult DcNoopPipeVisit(FDcReader* Reader) 28 | { 29 | FDcNoopWriter Writer{}; 30 | FDcPipeVisitor PipeVisitor(Reader, &Writer); 31 | return PipeVisitor.PipeVisit(); 32 | } 33 | 34 | FORCEINLINE FDcResult DcDumpPipeVisit(FDcReader* Reader) 35 | { 36 | FOutputDevice& WarnOut = (FOutputDevice&)*GWarn; 37 | FDcPrettyPrintWriter Writer(WarnOut); 38 | 39 | FDcPipeVisitor PipeVisitor(Reader, &Writer); 40 | return PipeVisitor.PipeVisit(); 41 | } 42 | 43 | DATACONFIGEXTRA_API FString DcGetFixturePath(const FString& Str); 44 | 45 | DATACONFIGEXTRA_API FDcResult DcPropertyPipeVisitAndTestEqual(FDcPropertyDatum FromDatum, FDcPropertyDatum ToDatum); 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/SerDe/DcSerDeAnyStruct.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /// Arbitrary struct <-> `FDcAnyStruct` 4 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 5 | #include "DataConfig/Serialize/DcSerializeTypes.h" 6 | #include "DataConfig/Extra/Types/DcAnyStruct.h" 7 | #include "DcSerDeAnyStruct.generated.h" 8 | 9 | namespace DcExtra 10 | { 11 | 12 | DATACONFIGEXTRA_API FDcResult DcHandlerDeserializeAnyStruct( 13 | FDcDeserializeContext& Ctx, 14 | TFunctionRef FuncLocateStruct 15 | ); 16 | 17 | DATACONFIGEXTRA_API FDcResult DcHandlerSerializeAnyStruct( 18 | FDcSerializeContext& Ctx, 19 | TFunctionRef FuncWriteStructType 20 | ); 21 | 22 | DATACONFIGEXTRA_API FDcResult HandlerDcAnyStructDeserialize(FDcDeserializeContext& Ctx); 23 | 24 | DATACONFIGEXTRA_API FDcResult HandlerDcAnyStructSerialize(FDcSerializeContext& Ctx); 25 | 26 | } // namespace DcExtra 27 | 28 | USTRUCT() 29 | struct FDcExtraTestWithAnyStruct1 30 | { 31 | GENERATED_BODY() 32 | 33 | UPROPERTY() FDcAnyStruct AnyStructField1; 34 | UPROPERTY() FDcAnyStruct AnyStructField2; 35 | UPROPERTY() FDcAnyStruct AnyStructField3; 36 | }; 37 | 38 | 39 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/SerDe/DcSerDeBase64.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 4 | #include "DataConfig/Serialize/DcSerializeTypes.h" 5 | #include "DcSerDeBase64.generated.h" 6 | 7 | /// blob `TArray` <-> Base64 string 8 | 9 | #if WITH_EDITORONLY_DATA 10 | 11 | namespace DcExtra { 12 | 13 | DATACONFIGEXTRA_API EDcDeserializePredicateResult PredicateIsBase64Blob(FDcDeserializeContext& Ctx); 14 | 15 | DATACONFIGEXTRA_API FDcResult HandleBase64BlobDeserialize(FDcDeserializeContext& Ctx); 16 | 17 | DATACONFIGEXTRA_API EDcSerializePredicateResult PredicateIsBase64Blob(FDcSerializeContext& Ctx); 18 | 19 | DATACONFIGEXTRA_API FDcResult HandleBase64BlobSerialize(FDcSerializeContext& Ctx); 20 | 21 | } // namespace DcExtra 22 | 23 | #endif // WITH_EDITORONLY_DATA 24 | 25 | USTRUCT() 26 | struct FDcExtraTestStructWithBase64 27 | { 28 | GENERATED_BODY() 29 | 30 | UPROPERTY(meta = (DcExtraBase64)) TArray BlobField1; 31 | UPROPERTY(meta = (DcExtraBase64)) TArray BlobField2; 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/SerDe/DcSerDeColor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 4 | #include "DataConfig/Serialize/DcSerializeTypes.h" 5 | #include "DataConfig/Extra/DcExtraCommon.h" 6 | #include "DcSerDeColor.generated.h" 7 | 8 | /// `FColor` <-> hex string like `#FFGGBBAA` 9 | 10 | namespace DcExtra { 11 | 12 | DATACONFIGEXTRA_API FDcResult HandlerColorDeserialize(FDcDeserializeContext& Ctx); 13 | 14 | DATACONFIGEXTRA_API FDcResult HandlerColorSerialize(FDcSerializeContext& Ctx); 15 | 16 | } // namespace DcExtra 17 | 18 | USTRUCT() 19 | struct FDcExtraTestStructWithColor1 20 | { 21 | GENERATED_BODY() 22 | DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcExtraTestStructWithColor1) 23 | 24 | UPROPERTY() FColor ColorField1; 25 | UPROPERTY() FColor ColorField2; 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/SerDe/DcSerDeInlineStruct.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /// Arbitrary struct <-> `FDcInlineStruct` 4 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 5 | #include "DataConfig/Serialize/DcSerializeTypes.h" 6 | #include "DataConfig/Extra/Types/DcInlineStruct.h" 7 | #include "DcSerDeInlineStruct.generated.h" 8 | 9 | namespace DcExtra 10 | { 11 | 12 | template 13 | struct DATACONFIGEXTRA_API TDcInlineStructDeserialize 14 | { 15 | static FDcResult DcHandlerDeserializeInlineStruct( 16 | FDcDeserializeContext& Ctx, 17 | TFunctionRef FuncLocateStruct 18 | ); 19 | static FDcResult HandlerDcInlineStructDeserialize(FDcDeserializeContext& Ctx); 20 | 21 | static UScriptStruct* StaticStruct(); 22 | }; 23 | 24 | template 25 | struct DATACONFIGEXTRA_API TDcInlineStructSerialize 26 | { 27 | static FDcResult DcHandlerSerializeInlineStruct( 28 | FDcSerializeContext& Ctx, 29 | TFunctionRef FuncWriteStructType 30 | ); 31 | 32 | static FDcResult HandlerDcInlineStructSerialize(FDcSerializeContext& Ctx); 33 | 34 | static UScriptStruct* StaticStruct(); 35 | }; 36 | 37 | } // namespace DcExtra 38 | 39 | USTRUCT() 40 | struct FDcExtraTestWithInlineStruct1 41 | { 42 | GENERATED_BODY() 43 | 44 | UPROPERTY() FDcInlineStruct64 InlineField1; 45 | UPROPERTY() FDcInlineStruct64 InlineField2;; 46 | }; 47 | 48 | USTRUCT() 49 | struct FDcExtraTestStruct128 50 | { 51 | GENERATED_BODY() 52 | 53 | uint8 Buf[128]; 54 | }; 55 | 56 | 57 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/SerDe/DcSerDeNested.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /// Nested examples 4 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 5 | #include "DataConfig/Serialize/DcSerializeTypes.h" 6 | #include "DcSerDeNested.generated.h" 7 | 8 | 9 | namespace DcExtra 10 | { 11 | 12 | DATACONFIGEXTRA_API FDcResult HandlerVector2DDeserialize(FDcDeserializeContext& Ctx); 13 | DATACONFIGEXTRA_API FDcResult HandlerVector2DSerialize(FDcSerializeContext& Ctx); 14 | 15 | #if WITH_EDITORONLY_DATA 16 | DATACONFIGEXTRA_API FDcResult HandlerGrid2DDeserialize(FDcDeserializeContext& Ctx); 17 | DATACONFIGEXTRA_API FDcResult HandlerGrid2DSerialize(FDcSerializeContext& Ctx); 18 | #endif // WITH_EDITORONLY_DATA 19 | 20 | } // namespace DcExtra 21 | 22 | USTRUCT() 23 | struct FDcGrid2D 24 | { 25 | GENERATED_BODY() 26 | 27 | UPROPERTY() TArray Data; 28 | }; 29 | 30 | 31 | USTRUCT() 32 | struct FDcExtraTestNested_Vec2 33 | { 34 | GENERATED_BODY() 35 | 36 | UPROPERTY() TArray Vec2ArrayField1; 37 | UPROPERTY() TArray Vec2ArrayField2; 38 | }; 39 | 40 | 41 | USTRUCT() 42 | struct FDcExtraTestNested_Grid 43 | { 44 | GENERATED_BODY() 45 | 46 | UPROPERTY(meta=(DcWidth = 2, DcHeight = 2)) FDcGrid2D GridField1; 47 | UPROPERTY(meta=(DcWidth = 3, DcHeight = 4)) FDcGrid2D GridField2; 48 | }; 49 | 50 | 51 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigExtra/Public/DataConfig/Extra/SerDe/DcSerDeRoot.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /// NDJSON and root object examples 4 | #include "DataConfig/Deserialize/DcDeserializeTypes.h" 5 | #include "DataConfig/Serialize/DcSerializeTypes.h" 6 | #include "DataConfig/Property/DcPropertyUtils.h" 7 | 8 | namespace DcExtra 9 | { 10 | 11 | DATACONFIGEXTRA_API FDcResult HandlerRootObjectDeserialize(FDcDeserializeContext& Ctx); 12 | DATACONFIGEXTRA_API FDcResult HandlerRootObjectSerialize(FDcSerializeContext& Ctx); 13 | 14 | DATACONFIGEXTRA_API FDcResult HandlerRootArrayDeserialize(FDcDeserializeContext& Ctx); 15 | DATACONFIGEXTRA_API FDcResult HandlerRootArraySerialize(FDcSerializeContext& Ctx); 16 | 17 | } // namespace DcExtra 18 | 19 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigHeadless.Target.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | using System.Collections.Generic; 3 | 4 | // UE5.4 onwards this `DataConfigHeadless.Target.cs` must recides here 5 | // under `Source` otherwise it won't build. 6 | 7 | public class DataConfigHeadlessTarget : TargetRules 8 | { 9 | public DataConfigHeadlessTarget(TargetInfo Target) : base(Target) 10 | { 11 | DefaultBuildSettings = BuildSettingsVersion.V2; 12 | 13 | Type = TargetType.Program; 14 | LaunchModuleName = "DataConfigHeadless"; 15 | // ! note that only monolithic works atm 16 | LinkType = TargetLinkType.Monolithic; 17 | 18 | MinGameModuleSourceFilesForUnityBuild = 2; 19 | 20 | // ! need this for logging 21 | bUseLoggingInShipping = true; 22 | 23 | bCompileICU = false; 24 | 25 | bCompileAgainstEngine = false; 26 | bCompileAgainstCoreUObject = true; 27 | bCompileAgainstApplicationCore = true; 28 | 29 | bForceEnableExceptions = false; 30 | 31 | bCompileWithPluginSupport = false; 32 | bBuildDeveloperTools = false; 33 | 34 | bIsBuildingConsoleApplication = true; 35 | 36 | #if UE_5_1_OR_LATER 37 | IncludeOrderVersion = EngineIncludeOrderVersion.Latest; 38 | #endif 39 | 40 | #if UE_5_3_OR_LATER 41 | DefaultBuildSettings = BuildSettingsVersion.Latest; 42 | #endif 43 | // toggle to use clang-cl 44 | // it works mostly except breaks FName natvis 45 | // WindowsPlatform.Compiler = WindowsCompiler.Clang; 46 | 47 | // toggle to buld with no `WITH_EDITORONLY_DATA` 48 | // bBuildWithEditorOnlyData = false; 49 | bBuildWithEditorOnlyData = true; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigHeadless/DataConfigHeadless.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | using System.IO; 3 | 4 | public class DataConfigHeadless : ModuleRules 5 | { 6 | public DataConfigHeadless(ReadOnlyTargetRules Target) : base(Target) 7 | { 8 | bRequiresImplementModule = false; 9 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PrivateDependencyModuleNames.AddRange( 12 | new string[] { 13 | "Core", 14 | "CoreUObject", 15 | "ApplicationCore", 16 | "Projects", 17 | "DataConfigCore", 18 | "DataConfigExtra", 19 | "DataConfigTests", 20 | #if UE_5_0_OR_LATER 21 | "DataConfigTests5", 22 | #endif 23 | #if UE_5_4_OR_LATER 24 | "DataConfigTests54", 25 | #endif 26 | }); 27 | 28 | PrivateIncludePathModuleNames.AddRange( 29 | new string[] { 30 | "Launch", 31 | }); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests/DataConfigTests.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | using System.IO; 3 | 4 | public class DataConfigTests : ModuleRules 5 | { 6 | public DataConfigTests(ReadOnlyTargetRules Target) : base(Target) 7 | { 8 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateDependencyModuleNames.AddRange( 11 | new string[] { 12 | "DataConfigCore", 13 | "DataConfigExtra", 14 | "Core", 15 | "CoreUObject", 16 | }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests/Private/DcTestBlurb.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DcTestBlurb.generated.h" 5 | 6 | UENUM() 7 | enum class EDcTestExampleEnum 8 | { 9 | Foo, Bar, Baz 10 | }; 11 | 12 | USTRUCT() 13 | struct FDcTestExampleStruct 14 | { 15 | GENERATED_BODY() 16 | UPROPERTY() FString StrField; 17 | UPROPERTY() EDcTestExampleEnum EnumField = EDcTestExampleEnum::Foo; 18 | UPROPERTY() TArray Colors; 19 | }; 20 | 21 | USTRUCT() 22 | struct FDcTestExampleSimple 23 | { 24 | GENERATED_BODY() 25 | 26 | UPROPERTY() FString StrField; 27 | UPROPERTY() int IntField = 0; 28 | }; 29 | 30 | 31 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests/Private/DcTestBlurb2.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DcTestProperty.h" 5 | #include "DcTestBlurb2.generated.h" 6 | 7 | USTRUCT() 8 | struct FDcTestExample2 9 | { 10 | GENERATED_BODY() 11 | 12 | UPROPERTY() FString StrField; 13 | UPROPERTY() FString StrArrField[3]; 14 | 15 | UPROPERTY() UDcBaseShape* InlineField = nullptr; 16 | UPROPERTY() UDcTestClass1* RefField = nullptr; 17 | 18 | void MakeFixture(); 19 | }; 20 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests/Private/DcTestMsgPack.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DcTestMsgPack.generated.h" 5 | 6 | USTRUCT() 7 | struct FDcTestMsgPackBlob 8 | { 9 | GENERATED_BODY() 10 | 11 | UPROPERTY() TArray Blob; 12 | }; 13 | 14 | UENUM() 15 | enum class EDcTestMsgPackCompareType 16 | { 17 | Skip, 18 | PrettyPrintEqualable, 19 | NumberBigNumber, 20 | Extension, 21 | }; 22 | 23 | USTRUCT() 24 | struct FMsgPackTestFixture 25 | { 26 | GENERATED_BODY() 27 | 28 | UPROPERTY() EDcTestMsgPackCompareType Type = EDcTestMsgPackCompareType::Skip; 29 | UPROPERTY() TArray Expect; 30 | UPROPERTY() TArray Actuals; 31 | 32 | UPROPERTY() FString ExpectDoubleStr; 33 | 34 | }; 35 | 36 | USTRUCT() 37 | struct FMsgPackTestGroup 38 | { 39 | GENERATED_BODY() 40 | 41 | UPROPERTY() FString Name; 42 | UPROPERTY() TArray Fixtures; 43 | }; 44 | 45 | USTRUCT() 46 | struct FMsgPackTestSuite 47 | { 48 | GENERATED_BODY() 49 | 50 | UPROPERTY() TArray Groups; 51 | }; 52 | 53 | 54 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests/Private/DcTestProperty3.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DcTestProperty.h" 5 | #include "DataConfig/Extra/DcExtraCommon.h" 6 | #include "DcTestProperty3.generated.h" 7 | 8 | 9 | USTRUCT() 10 | struct FDcTestMeta1 11 | { 12 | GENERATED_BODY() 13 | DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcTestMeta1) 14 | 15 | UPROPERTY(meta = (DcSkip)) int SkipField1; 16 | }; 17 | 18 | 19 | USTRUCT() 20 | struct FDcTestClassAccessControl 21 | { 22 | GENERATED_BODY() 23 | DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcTestClassAccessControl) 24 | 25 | UPROPERTY() UDcBaseShape* InlineField; 26 | 27 | UPROPERTY() UDcTestClass1* RefField; 28 | }; 29 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests/Private/DcTestProperty5.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DcTestProperty5.generated.h" 5 | 6 | USTRUCT() 7 | struct FDcTestStructWithDefaults 8 | { 9 | GENERATED_BODY() 10 | 11 | enum { _DEFAULT_INT = 254 }; 12 | 13 | UPROPERTY() FString StrFieldWithDefault = "Foo"; 14 | UPROPERTY() int IntFieldWithDefault = _DEFAULT_INT; 15 | 16 | UPROPERTY() TArray StrArrFieldWithDefault = {"Foo", "Bar", "Baz"}; 17 | UPROPERTY() TSet StrSetFieldWithDefault = {"One", "Two", "Three"}; 18 | UPROPERTY() TMap StringIntMapFieldWithDefault = { 19 | {"One", 1}, 20 | {"Two", 2}, 21 | {"Three", 1+1+1*1}, 22 | }; 23 | }; 24 | 25 | USTRUCT() 26 | struct FDcTestStructWithText 27 | { 28 | GENERATED_BODY() 29 | 30 | UPROPERTY() FText TextFieldAlpha; 31 | UPROPERTY() FText TextFieldBeta; 32 | 33 | void MakeFixture(); 34 | }; 35 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests/Private/DcTestUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "DcTestSerDe.h" 2 | #include "DataConfig/Extra/Misc/DcTestCommon.h" 3 | #include "DataConfig/Automation/DcAutomation.h" 4 | #include "DataConfig/Automation/DcAutomationUtils.h" 5 | #include "DataConfig/Diagnostic/DcDiagnosticCommon.h" 6 | 7 | DC_TEST("DataConfig.Core.Utils.DcDiagnostic") 8 | { 9 | enum class ETestEnum : uint8 10 | { 11 | Foo, 12 | Bar, 13 | Bart = 253, 14 | }; 15 | 16 | { 17 | FDcDiagnostic Diag{FDcErrorCode{DcDCommon::Category, DcDCommon::Unexpected1}}; 18 | Diag << ETestEnum::Bart; 19 | UTEST_TRUE("Utils DcDiagnostic", Diag.Args[0].DataType == EDcDataEntry::Int32); 20 | UTEST_TRUE("Utils DcDiagnostic", Diag.Args[0].GetValue() == (int)ETestEnum::Bart); 21 | } 22 | 23 | { 24 | ETestEnum Val = ETestEnum::Bart; 25 | FDcDiagnostic Diag{FDcErrorCode{DcDCommon::Category, DcDCommon::Unexpected1}}; 26 | Diag << Val; // ref 27 | UTEST_TRUE("Utils DcDiagnostic", Diag.Args[0].DataType == EDcDataEntry::Int32); 28 | UTEST_TRUE("Utils DcDiagnostic", Diag.Args[0].GetValue() == (int)ETestEnum::Bart); 29 | } 30 | 31 | return true; 32 | } 33 | 34 | #if !(UE_BUILD_TEST || UE_BUILD_SHIPPING) 35 | 36 | #if !WITH_ENGINE // engine sometimes have uninitialized fields 37 | DC_TEST("DataConfig.Core.Utils.AttemptToFindUninitializedScriptStructMembers") 38 | { 39 | UTEST_EQUAL("No Unitialized Field", FStructUtils::AttemptToFindUninitializedScriptStructMembers(), 0); 40 | 41 | return true; 42 | } 43 | #endif // !WITH_ENGINE 44 | 45 | #endif // !(UE_BUILD_TEST || UE_BUILD_SHIPPING) 46 | 47 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests/Private/DcTestsModule.cpp: -------------------------------------------------------------------------------- 1 | #include "CoreMinimal.h" 2 | #include "Modules/ModuleInterface.h" 3 | #include "Modules/ModuleManager.h" 4 | #include "DataConfig/DcTypes.h" 5 | 6 | class FDcTestsModule : public IModuleInterface 7 | { 8 | public: 9 | static inline FDcTestsModule& Get() 10 | { 11 | return FModuleManager::LoadModuleChecked("DataConfigTests"); 12 | } 13 | 14 | static inline bool IsAvailable() 15 | { 16 | return FModuleManager::Get().IsModuleLoaded("DataConfigTests"); 17 | } 18 | 19 | void StartupModule() override 20 | { 21 | UE_LOG(LogDataConfigCore, Log, TEXT("DcTestsModule module starting up")); 22 | } 23 | 24 | void ShutdownModule() override 25 | { 26 | UE_LOG(LogDataConfigCore, Log, TEXT("DcTestsModule module shutting down")); 27 | } 28 | }; 29 | 30 | IMPLEMENT_MODULE(FDcTestsModule, DataConfigTests); 31 | 32 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests/Private/IDcTestInterface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UObject/Interface.h" 4 | #include "UObject/ObjectMacros.h" 5 | #include "IDcTestInterface.generated.h" 6 | 7 | // these 2 classes must be in one standalone header or it's a guarenteed UHT cyclic header reference 8 | 9 | UINTERFACE() 10 | class UDcTestInterface1 : public UInterface 11 | { 12 | GENERATED_BODY() 13 | }; 14 | 15 | class IDcTestInterface1 16 | { 17 | GENERATED_BODY() 18 | }; 19 | 20 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests5/DataConfigTests5.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | using System.IO; 3 | 4 | public class DataConfigTests5 : ModuleRules 5 | { 6 | public DataConfigTests5(ReadOnlyTargetRules Target) : base(Target) 7 | { 8 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateDependencyModuleNames.AddRange( 11 | new string[] { 12 | "DataConfigCore", 13 | "DataConfigExtra", 14 | "Core", 15 | "CoreUObject", 16 | }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests5/Private/DcTestUE5.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "DataConfig/Extra/DcExtraCommon.h" 5 | #include "DcTestUE5.generated.h" 6 | 7 | UCLASS() 8 | class UDcTest5ClassBase : public UObject 9 | { 10 | GENERATED_BODY() 11 | 12 | UPROPERTY() FString BaseStrField1; 13 | }; 14 | 15 | UCLASS() 16 | class UDcTest5ClassDerived : public UDcTest5ClassBase 17 | { 18 | GENERATED_BODY() 19 | 20 | UPROPERTY() FString DerivedStrField1; 21 | }; 22 | 23 | USTRUCT() 24 | struct FDcTest5ObjectPtrAlpha 25 | { 26 | GENERATED_BODY() 27 | 28 | UPROPERTY() TObjectPtr ObjPtrField1; 29 | UPROPERTY() TObjectPtr ObjPtrField2; 30 | }; 31 | 32 | USTRUCT() 33 | struct FDcTestLWC 34 | { 35 | GENERATED_BODY() 36 | DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcTestLWC) 37 | 38 | UPROPERTY() FVector VectorField; 39 | UPROPERTY() FVector3f Vector3fField; 40 | UPROPERTY() FVector3d Vector3dField; 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests5/Private/DcTests5Module.cpp: -------------------------------------------------------------------------------- 1 | #include "CoreMinimal.h" 2 | #include "Modules/ModuleInterface.h" 3 | #include "Modules/ModuleManager.h" 4 | #include "DataConfig/DcTypes.h" 5 | 6 | class FDcTests5Module : public IModuleInterface 7 | { 8 | public: 9 | static inline FDcTests5Module& Get() 10 | { 11 | return FModuleManager::LoadModuleChecked("DataConfigTests5"); 12 | } 13 | 14 | static inline bool IsAvailable() 15 | { 16 | return FModuleManager::Get().IsModuleLoaded("DataConfigTests5"); 17 | } 18 | 19 | void StartupModule() override 20 | { 21 | UE_LOG(LogDataConfigCore, Log, TEXT("DcTests5Module module starting up")); 22 | } 23 | 24 | void ShutdownModule() override 25 | { 26 | UE_LOG(LogDataConfigCore, Log, TEXT("DcTests5Module module shutting down")); 27 | } 28 | }; 29 | 30 | IMPLEMENT_MODULE(FDcTests5Module, DataConfigTests5); 31 | 32 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests54/DataConfigTests54.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | using System.IO; 3 | 4 | public class DataConfigTests54 : ModuleRules 5 | { 6 | public DataConfigTests54(ReadOnlyTargetRules Target) : base(Target) 7 | { 8 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateDependencyModuleNames.AddRange( 11 | new string[] { 12 | "DataConfigCore", 13 | "DataConfigExtra", 14 | "Core", 15 | "CoreUObject", 16 | }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests54/Private/DcTestUE54.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "Misc/Optional.h" 5 | #include "DcTestUE54.generated.h" 6 | 7 | USTRUCT() 8 | struct FDcInnerStruct54 9 | { 10 | GENERATED_BODY() 11 | 12 | UPROPERTY() FString StrField; 13 | UPROPERTY() int IntField = 0; 14 | }; 15 | 16 | USTRUCT() 17 | struct FDcTestOptional 18 | { 19 | GENERATED_BODY() 20 | 21 | UPROPERTY() TOptional OptionalFloatField1; 22 | UPROPERTY() TOptional OptionalFloatField2; 23 | 24 | UPROPERTY() TOptional OptionalStrField1; 25 | UPROPERTY() TOptional OptionalStrField2; 26 | 27 | UPROPERTY() TOptional OptionalStructField1; 28 | UPROPERTY() TOptional OptionalStructField2; 29 | }; 30 | -------------------------------------------------------------------------------- /DataConfig/Source/DataConfigTests54/Private/DcTests54Module.cpp: -------------------------------------------------------------------------------- 1 | #include "CoreMinimal.h" 2 | #include "Modules/ModuleInterface.h" 3 | #include "Modules/ModuleManager.h" 4 | #include "DataConfig/DcTypes.h" 5 | 6 | class FDcTests54Module : public IModuleInterface 7 | { 8 | public: 9 | static inline FDcTests54Module& Get() 10 | { 11 | return FModuleManager::LoadModuleChecked("DataConfigTests5"); 12 | } 13 | 14 | static inline bool IsAvailable() 15 | { 16 | return FModuleManager::Get().IsModuleLoaded("DataConfigTests54"); 17 | } 18 | 19 | void StartupModule() override 20 | { 21 | UE_LOG(LogDataConfigCore, Log, TEXT("FDcTests54Module module starting up")); 22 | } 23 | 24 | void ShutdownModule() override 25 | { 26 | UE_LOG(LogDataConfigCore, Log, TEXT("FDcTests54Module module shutting down")); 27 | } 28 | }; 29 | 30 | IMPLEMENT_MODULE(FDcTests54Module, DataConfigTests54); 31 | 32 | -------------------------------------------------------------------------------- /DataConfig/Tests/DcJSONFixtures/n_array_double_array_no_comma.json: -------------------------------------------------------------------------------- 1 | [[][]] -------------------------------------------------------------------------------- /DataConfig/Tests/DcJSONFixtures/y_non_ascii_polish.json: -------------------------------------------------------------------------------- 1 | "śćźąę" -------------------------------------------------------------------------------- /DataConfig/Tests/Fixture_AbilityAlpha.json: -------------------------------------------------------------------------------- 1 | { 2 | /// Tags 3 | "AbilityTags" : [ 4 | "DataConfig.Foo.Bar", 5 | "DataConfig.Foo.Bar.Baz", 6 | ], 7 | "CancelAbilitiesWithTag" : [ 8 | "DataConfig.Foo.Bar.Baz", 9 | "DataConfig.Tar.Taz", 10 | ], 11 | /// Costs 12 | "CostGameplayEffectClass" : "/DataConfig/DcFixture/DcTestGameplayEffectAlpha", 13 | /// Advanced 14 | "ReplicationPolicy" : "ReplicateYes", 15 | "InstancingPolicy" : "NonInstanced", 16 | } 17 | -------------------------------------------------------------------------------- /DataConfig/Tests/Fixture_EffectAlpha.json: -------------------------------------------------------------------------------- 1 | { 2 | /// Effect 3 | "DurationPolicy" : "Infinite", 4 | "Modifiers" : [ 5 | { 6 | "Attribute" : "DcTestAttributeSet.Mana", 7 | }, 8 | { 9 | "Attribute" : "DcTestAttributeSet.Health", 10 | }, 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /DataConfig/Tests/Fixture_UTF8Roundtrip.json: -------------------------------------------------------------------------------- 1 | { 2 | "en" : "I can eat glass and it doesn't hurt me.", 3 | "zh-Hant" : "我能吞下玻璃而不傷身體。", 4 | "zh-Hans" : "我能吞下玻璃而不伤身体。", 5 | "ja" : "私はガラスを食べられます。それは私を傷つけません。", 6 | "ko" : "나는 유리를 먹을 수 있어요. 그래도 아프지 않아요", 7 | "en-escape" : "I\tcan\teat\tglass\tand it doesn't hurt me.", 8 | "zh-Hant-escape" : "我\t能\t吞\t下\t玻璃而不傷身體。" 9 | } -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/_README.md: -------------------------------------------------------------------------------- 1 | Integrated from 2 | 3 | We marked cases that we don't support with suffix `.skip`, with reasons in it. -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_number_double_huge_neg_exp.json: -------------------------------------------------------------------------------- 1 | [123.456e-789] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_number_huge_exp.json: -------------------------------------------------------------------------------- 1 | [0.4e00669999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999969999999006] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_number_neg_int_huge_exp.json: -------------------------------------------------------------------------------- 1 | [-1e+9999] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_number_pos_double_huge_exp.json: -------------------------------------------------------------------------------- 1 | [1.5e+9999] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_number_real_neg_overflow.json: -------------------------------------------------------------------------------- 1 | [-123123e100000] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_number_real_pos_overflow.json: -------------------------------------------------------------------------------- 1 | [123123e100000] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_number_real_underflow.json: -------------------------------------------------------------------------------- 1 | [123e-10000000] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_number_too_big_neg_int.json: -------------------------------------------------------------------------------- 1 | [-123123123123123123123123123123] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_number_too_big_pos_int.json: -------------------------------------------------------------------------------- 1 | [100000000000000000000] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_number_very_big_negative_int.json: -------------------------------------------------------------------------------- 1 | [-237462374673276894279832749832423479823246327846] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_object_key_lone_2nd_surrogate.json: -------------------------------------------------------------------------------- 1 | {"\uDFAA":0} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_1st_surrogate_but_2nd_missing.json: -------------------------------------------------------------------------------- 1 | ["\uDADA"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_1st_valid_surrogate_2nd_invalid.json: -------------------------------------------------------------------------------- 1 | ["\uD888\u1234"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_UTF-16LE_with_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_UTF-16LE_with_BOM.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_UTF-8_invalid_sequence.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_UTF-8_invalid_sequence.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_UTF8_surrogate_U+D800.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_UTF8_surrogate_U+D800.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_incomplete_surrogate_and_escape_valid.json: -------------------------------------------------------------------------------- 1 | ["\uD800\n"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_incomplete_surrogate_pair.json: -------------------------------------------------------------------------------- 1 | ["\uDd1ea"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_incomplete_surrogates_escape_valid.json: -------------------------------------------------------------------------------- 1 | ["\uD800\uD800\n"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_invalid_lonely_surrogate.json: -------------------------------------------------------------------------------- 1 | ["\ud800"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_invalid_surrogate.json: -------------------------------------------------------------------------------- 1 | ["\ud800abc"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_invalid_utf-8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_invalid_utf-8.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_inverted_surrogates_U+1D11E.json: -------------------------------------------------------------------------------- 1 | ["\uDd1e\uD834"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_iso_latin_1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_iso_latin_1.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_lone_second_surrogate.json: -------------------------------------------------------------------------------- 1 | ["\uDFAA"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_lone_utf8_continuation_byte.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_lone_utf8_continuation_byte.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_not_in_unicode_range.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_not_in_unicode_range.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_overlong_sequence_2_bytes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_overlong_sequence_2_bytes.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_overlong_sequence_6_bytes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_overlong_sequence_6_bytes.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_overlong_sequence_6_bytes_null.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_overlong_sequence_6_bytes_null.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_truncated-utf-8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_truncated-utf-8.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_utf16BE_no_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_utf16BE_no_BOM.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_string_utf16LE_no_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/i_string_utf16LE_no_BOM.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_structure_500_nested_arrays.json: -------------------------------------------------------------------------------- 1 | [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/i_structure_UTF-8_BOM_empty_object.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_1_true_without_comma.json: -------------------------------------------------------------------------------- 1 | [1 true] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_a_invalid_utf8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/n_array_a_invalid_utf8.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_colon_instead_of_comma.json: -------------------------------------------------------------------------------- 1 | ["": 1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_comma_after_close.json: -------------------------------------------------------------------------------- 1 | [""], -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_comma_and_number.json: -------------------------------------------------------------------------------- 1 | [,1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_double_comma.json: -------------------------------------------------------------------------------- 1 | [1,,2] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_double_extra_comma.json: -------------------------------------------------------------------------------- 1 | ["x",,] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_extra_close.json: -------------------------------------------------------------------------------- 1 | ["x"]] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_extra_comma.json.skip: -------------------------------------------------------------------------------- 1 | ["",] 2 | 3 | // we explicitly support this as relaxed JSON spec -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_incomplete.json: -------------------------------------------------------------------------------- 1 | ["x" -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_incomplete_invalid_value.json: -------------------------------------------------------------------------------- 1 | [x -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_inner_array_no_comma.json: -------------------------------------------------------------------------------- 1 | [3[4]] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_invalid_utf8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/n_array_invalid_utf8.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_items_separated_by_semicolon.json: -------------------------------------------------------------------------------- 1 | [1:2] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_just_comma.json: -------------------------------------------------------------------------------- 1 | [,] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_just_minus.json: -------------------------------------------------------------------------------- 1 | [-] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_missing_value.json: -------------------------------------------------------------------------------- 1 | [ , ""] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_newlines_unclosed.json: -------------------------------------------------------------------------------- 1 | ["a", 2 | 4 3 | ,1, -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_number_and_comma.json.skip: -------------------------------------------------------------------------------- 1 | [1,] 2 | 3 | // we explicitly support this as relaxed JSON spec -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_number_and_several_commas.json: -------------------------------------------------------------------------------- 1 | [1,,] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_spaces_vertical_tab_formfeed.json: -------------------------------------------------------------------------------- 1 | [" a"\f] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_star_inside.json: -------------------------------------------------------------------------------- 1 | [*] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_unclosed.json: -------------------------------------------------------------------------------- 1 | ["" -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_unclosed_trailing_comma.json: -------------------------------------------------------------------------------- 1 | [1, -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_unclosed_with_new_lines.json: -------------------------------------------------------------------------------- 1 | [1, 2 | 1 3 | ,1 -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_array_unclosed_with_object_inside.json: -------------------------------------------------------------------------------- 1 | [{} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_incomplete_false.json: -------------------------------------------------------------------------------- 1 | [fals] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_incomplete_null.json: -------------------------------------------------------------------------------- 1 | [nul] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_incomplete_true.json: -------------------------------------------------------------------------------- 1 | [tru] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_multidigit_number_then_00.json.skip: -------------------------------------------------------------------------------- 1 | 123 -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_++.json: -------------------------------------------------------------------------------- 1 | [++1234] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_+1.json: -------------------------------------------------------------------------------- 1 | [+1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_+Inf.json: -------------------------------------------------------------------------------- 1 | [+Inf] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_-01.json: -------------------------------------------------------------------------------- 1 | [-01] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_-1.0..json: -------------------------------------------------------------------------------- 1 | [-1.0.] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_-2..json: -------------------------------------------------------------------------------- 1 | [-2.] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_-NaN.json: -------------------------------------------------------------------------------- 1 | [-NaN] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_.-1.json: -------------------------------------------------------------------------------- 1 | [.-1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_.2e-3.json: -------------------------------------------------------------------------------- 1 | [.2e-3] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_0.1.2.json: -------------------------------------------------------------------------------- 1 | [0.1.2] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_0.3e+.json: -------------------------------------------------------------------------------- 1 | [0.3e+] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_0.3e.json: -------------------------------------------------------------------------------- 1 | [0.3e] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_0.e1.json: -------------------------------------------------------------------------------- 1 | [0.e1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_0_capital_E+.json: -------------------------------------------------------------------------------- 1 | [0E+] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_0_capital_E.json: -------------------------------------------------------------------------------- 1 | [0E] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_0e+.json: -------------------------------------------------------------------------------- 1 | [0e+] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_0e.json: -------------------------------------------------------------------------------- 1 | [0e] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_1.0e+.json: -------------------------------------------------------------------------------- 1 | [1.0e+] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_1.0e-.json: -------------------------------------------------------------------------------- 1 | [1.0e-] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_1.0e.json: -------------------------------------------------------------------------------- 1 | [1.0e] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_1_000.json: -------------------------------------------------------------------------------- 1 | [1 000.0] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_1eE2.json: -------------------------------------------------------------------------------- 1 | [1eE2] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_2.e+3.json: -------------------------------------------------------------------------------- 1 | [2.e+3] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_2.e-3.json: -------------------------------------------------------------------------------- 1 | [2.e-3] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_2.e3.json: -------------------------------------------------------------------------------- 1 | [2.e3] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_9.e+.json: -------------------------------------------------------------------------------- 1 | [9.e+] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_Inf.json: -------------------------------------------------------------------------------- 1 | [Inf] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_NaN.json: -------------------------------------------------------------------------------- 1 | [NaN] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_U+FF11_fullwidth_digit_one.json: -------------------------------------------------------------------------------- 1 | [1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_expression.json: -------------------------------------------------------------------------------- 1 | [1+2] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_hex_1_digit.json: -------------------------------------------------------------------------------- 1 | [0x1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_hex_2_digits.json: -------------------------------------------------------------------------------- 1 | [0x42] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_infinity.json: -------------------------------------------------------------------------------- 1 | [Infinity] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_invalid+-.json: -------------------------------------------------------------------------------- 1 | [0e+-1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_invalid-negative-real.json: -------------------------------------------------------------------------------- 1 | [-123.123foo] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_invalid-utf-8-in-bigger-int.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/n_number_invalid-utf-8-in-bigger-int.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_invalid-utf-8-in-exponent.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/n_number_invalid-utf-8-in-exponent.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_invalid-utf-8-in-int.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/n_number_invalid-utf-8-in-int.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_minus_infinity.json: -------------------------------------------------------------------------------- 1 | [-Infinity] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_minus_sign_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | [-foo] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_minus_space_1.json: -------------------------------------------------------------------------------- 1 | [- 1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_neg_int_starting_with_zero.json: -------------------------------------------------------------------------------- 1 | [-012] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_neg_real_without_int_part.json: -------------------------------------------------------------------------------- 1 | [-.123] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_neg_with_garbage_at_end.json: -------------------------------------------------------------------------------- 1 | [-1x] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_real_garbage_after_e.json: -------------------------------------------------------------------------------- 1 | [1ea] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_real_with_invalid_utf8_after_e.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/n_number_real_with_invalid_utf8_after_e.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_real_without_fractional_part.json: -------------------------------------------------------------------------------- 1 | [1.] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_starting_with_dot.json: -------------------------------------------------------------------------------- 1 | [.123] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_with_alpha.json: -------------------------------------------------------------------------------- 1 | [1.2a-3] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_with_alpha_char.json: -------------------------------------------------------------------------------- 1 | [1.8011670033376514H-308] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_number_with_leading_zero.json: -------------------------------------------------------------------------------- 1 | [012] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_bad_value.json: -------------------------------------------------------------------------------- 1 | ["x", truth] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_bracket_key.json: -------------------------------------------------------------------------------- 1 | {[: "x"} 2 | -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_comma_instead_of_colon.json: -------------------------------------------------------------------------------- 1 | {"x", null} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_double_colon.json: -------------------------------------------------------------------------------- 1 | {"x"::"b"} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_emoji.json: -------------------------------------------------------------------------------- 1 | {🇨🇭} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_garbage_at_end.json: -------------------------------------------------------------------------------- 1 | {"a":"a" 123} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_key_with_single_quotes.json: -------------------------------------------------------------------------------- 1 | {key: 'value'} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_lone_continuation_byte_in_key_and_trailing_comma.json.skip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/n_object_lone_continuation_byte_in_key_and_trailing_comma.json.skip -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_missing_colon.json: -------------------------------------------------------------------------------- 1 | {"a" b} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_missing_key.json: -------------------------------------------------------------------------------- 1 | {:"b"} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_missing_semicolon.json: -------------------------------------------------------------------------------- 1 | {"a" "b"} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_missing_value.json: -------------------------------------------------------------------------------- 1 | {"a": -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_no-colon.json: -------------------------------------------------------------------------------- 1 | {"a" -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_non_string_key.json: -------------------------------------------------------------------------------- 1 | {1:1} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_non_string_key_but_huge_number_instead.json: -------------------------------------------------------------------------------- 1 | {9999E9999:1} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_repeated_null_null.json: -------------------------------------------------------------------------------- 1 | {null:null,null:null} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_several_trailing_commas.json: -------------------------------------------------------------------------------- 1 | {"id":0,,,,,} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_single_quote.json: -------------------------------------------------------------------------------- 1 | {'a':0} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_trailing_comma.json.skip: -------------------------------------------------------------------------------- 1 | {"id":0,} 2 | 3 | // we explicitly support this as relaxed JSON spec -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_trailing_comment.json.skip: -------------------------------------------------------------------------------- 1 | {"a":"b"}/**/ 2 | 3 | // we explicitly support this as relaxed JSON spec -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_trailing_comment_open.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}/**// -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_trailing_comment_slash_open.json.skip: -------------------------------------------------------------------------------- 1 | {"a":"b"}// 2 | 3 | // we explicitly support this as relaxed JSON spec -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_trailing_comment_slash_open_incomplete.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}/ -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_two_commas_in_a_row.json: -------------------------------------------------------------------------------- 1 | {"a":"b",,"c":"d"} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_unquoted_key.json: -------------------------------------------------------------------------------- 1 | {a: "b"} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_unterminated-value.json: -------------------------------------------------------------------------------- 1 | {"a":"a -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_with_single_string.json: -------------------------------------------------------------------------------- 1 | { "foo" : "bar", "a" } -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_object_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}# -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_single_space.json.skip: -------------------------------------------------------------------------------- 1 | 2 | 3 | // allow this as empty object -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_1_surrogate_then_escape.json: -------------------------------------------------------------------------------- 1 | ["\uD800\"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_1_surrogate_then_escape_u.json.skip: -------------------------------------------------------------------------------- 1 | ["\uD800\u"] 2 | 3 | // FParse::QuotedString report OK -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_1_surrogate_then_escape_u1.json.skip: -------------------------------------------------------------------------------- 1 | ["\uD800\u1"] 2 | 3 | // FParse::QuotedString report OK -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_1_surrogate_then_escape_u1x.json.skip: -------------------------------------------------------------------------------- 1 | ["\uD800\u1x"] 2 | 3 | // FParse::QuotedString report OK -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_accentuated_char_no_quotes.json: -------------------------------------------------------------------------------- 1 | [é] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_backslash_00.json: -------------------------------------------------------------------------------- 1 | ["\"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_escape_x.json.skip: -------------------------------------------------------------------------------- 1 | ["\x00"] 2 | 3 | // FParse::QuotedString report OK -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_escaped_backslash_bad.json: -------------------------------------------------------------------------------- 1 | ["\\\"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_escaped_ctrl_char_tab.json: -------------------------------------------------------------------------------- 1 | ["\ "] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_escaped_emoji.json.skip: -------------------------------------------------------------------------------- 1 | ["\🌀"] 2 | 3 | // FParse::QuotedString report OK -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_incomplete_escape.json: -------------------------------------------------------------------------------- 1 | ["\"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_incomplete_escaped_character.json.skip: -------------------------------------------------------------------------------- 1 | ["\u00A"] 2 | 3 | // FParse::QuotedString report OK -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_incomplete_surrogate.json.skip: -------------------------------------------------------------------------------- 1 | ["\uD834\uDd"] 2 | 3 | // FParse::QuotedString report OK -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_incomplete_surrogate_escape_invalid.json.skip: -------------------------------------------------------------------------------- 1 | ["\uD800\uD800\x"] 2 | 3 | // FParse::QuotedString report OK -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_invalid-utf-8-in-escape.json.skip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/n_string_invalid-utf-8-in-escape.json.skip -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_invalid_backslash_esc.json.skip: -------------------------------------------------------------------------------- 1 | ["\a"] 2 | 3 | // FParse::QuotedString report OK -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_invalid_unicode_escape.json.skip: -------------------------------------------------------------------------------- 1 | ["\uqqqq"] 2 | 3 | // FParse::QuotedString report OK -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_invalid_utf8_after_escape.json.skip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/n_string_invalid_utf8_after_escape.json.skip -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_leading_uescaped_thinspace.json: -------------------------------------------------------------------------------- 1 | [\u0020"asd"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_no_quotes_with_bad_escape.json: -------------------------------------------------------------------------------- 1 | [\n] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_single_doublequote.json: -------------------------------------------------------------------------------- 1 | " -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_single_quote.json: -------------------------------------------------------------------------------- 1 | ['single quote'] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_single_string_no_double_quotes.json: -------------------------------------------------------------------------------- 1 | abc -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_start_escape_unclosed.json: -------------------------------------------------------------------------------- 1 | ["\ -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_unescaped_ctrl_char.json: -------------------------------------------------------------------------------- 1 | ["aa"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_unescaped_newline.json: -------------------------------------------------------------------------------- 1 | ["new 2 | line"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_unescaped_tab.json: -------------------------------------------------------------------------------- 1 | [" "] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_unicode_CapitalU.json.skip: -------------------------------------------------------------------------------- 1 | "\UA66D" 2 | 3 | // FParse::QuotedString report OK -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_string_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | ""x -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_U+2060_word_joined.json: -------------------------------------------------------------------------------- 1 | [⁠] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_UTF8_BOM_no_data.json.skip: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_angle_bracket_..json: -------------------------------------------------------------------------------- 1 | <.> -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_angle_bracket_null.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_array_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | [1]x -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_array_with_extra_array_close.json: -------------------------------------------------------------------------------- 1 | [1]] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_array_with_unclosed_string.json: -------------------------------------------------------------------------------- 1 | ["asd] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_ascii-unicode-identifier.json: -------------------------------------------------------------------------------- 1 | aå -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_capitalized_True.json: -------------------------------------------------------------------------------- 1 | [True] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_close_unopened_array.json: -------------------------------------------------------------------------------- 1 | 1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_comma_instead_of_closing_brace.json: -------------------------------------------------------------------------------- 1 | {"x": true, -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_double_array.json.skip: -------------------------------------------------------------------------------- 1 | [][] 2 | 3 | // we explicitly support this to allow NDJSON like behavior at root -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_end_array.json: -------------------------------------------------------------------------------- 1 | ] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_incomplete_UTF8_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/DataConfig/Tests/JSONTestSuiteParsing/n_structure_incomplete_UTF8_BOM.json -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_lone-invalid-utf-8.json: -------------------------------------------------------------------------------- 1 | � -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_lone-open-bracket.json: -------------------------------------------------------------------------------- 1 | [ -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_no_data.json.skip: -------------------------------------------------------------------------------- 1 | 2 | 3 | // we allow this at root level 4 | -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_null-byte-outside-string.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_number_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | 2@ -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_object_followed_by_closing_object.json: -------------------------------------------------------------------------------- 1 | {}} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_object_unclosed_no_value.json: -------------------------------------------------------------------------------- 1 | {"": -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_object_with_comment.json.skip: -------------------------------------------------------------------------------- 1 | {"a":/*comment*/"b"} 2 | 3 | // we explicitly support this as relaxed JSON spec -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_object_with_trailing_garbage.json.skip: -------------------------------------------------------------------------------- 1 | {"a": true} "x" 2 | 3 | // we explicitly support this to allow NDJSON like behavior at root -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_array_apostrophe.json: -------------------------------------------------------------------------------- 1 | [' -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_array_comma.json: -------------------------------------------------------------------------------- 1 | [, -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_array_open_object.json: -------------------------------------------------------------------------------- 1 | [{ -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_array_open_string.json: -------------------------------------------------------------------------------- 1 | ["a -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_array_string.json: -------------------------------------------------------------------------------- 1 | ["a" -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_object.json: -------------------------------------------------------------------------------- 1 | { -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_object_close_array.json: -------------------------------------------------------------------------------- 1 | {] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_object_comma.json: -------------------------------------------------------------------------------- 1 | {, -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_object_open_array.json: -------------------------------------------------------------------------------- 1 | {[ -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_object_open_string.json: -------------------------------------------------------------------------------- 1 | {"a -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_object_string_with_apostrophes.json: -------------------------------------------------------------------------------- 1 | {'a' -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_open_open.json: -------------------------------------------------------------------------------- 1 | ["\{["\{["\{["\{ -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_single_eacute.json: -------------------------------------------------------------------------------- 1 | � -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_single_star.json: -------------------------------------------------------------------------------- 1 | * -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_trailing_#.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}#{} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_uescaped_LF_before_string.json: -------------------------------------------------------------------------------- 1 | [\u000A""] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_unclosed_array.json: -------------------------------------------------------------------------------- 1 | [1 -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_unclosed_array_partial_null.json: -------------------------------------------------------------------------------- 1 | [ false, nul -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_unclosed_array_unfinished_false.json: -------------------------------------------------------------------------------- 1 | [ true, fals -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_unclosed_array_unfinished_true.json: -------------------------------------------------------------------------------- 1 | [ false, tru -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_unclosed_object.json: -------------------------------------------------------------------------------- 1 | {"asd":"asd" -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_unicode-identifier.json: -------------------------------------------------------------------------------- 1 | å -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_whitespace_U+2060_word_joiner.json: -------------------------------------------------------------------------------- 1 | [⁠] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/n_structure_whitespace_formfeed.json: -------------------------------------------------------------------------------- 1 | [ ] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_array_arraysWithSpaces.json: -------------------------------------------------------------------------------- 1 | [[] ] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_array_empty-string.json: -------------------------------------------------------------------------------- 1 | [""] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_array_empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_array_ending_with_newline.json: -------------------------------------------------------------------------------- 1 | ["a"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_array_false.json: -------------------------------------------------------------------------------- 1 | [false] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_array_heterogeneous.json: -------------------------------------------------------------------------------- 1 | [null, 1, "1", {}] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_array_null.json: -------------------------------------------------------------------------------- 1 | [null] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_array_with_1_and_newline.json: -------------------------------------------------------------------------------- 1 | [1 2 | ] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_array_with_leading_space.json: -------------------------------------------------------------------------------- 1 | [1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_array_with_several_null.json: -------------------------------------------------------------------------------- 1 | [1,null,null,null,2] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_array_with_trailing_space.json: -------------------------------------------------------------------------------- 1 | [2] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number.json: -------------------------------------------------------------------------------- 1 | [123e65] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_0e+1.json: -------------------------------------------------------------------------------- 1 | [0e+1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_0e1.json: -------------------------------------------------------------------------------- 1 | [0e1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_after_space.json: -------------------------------------------------------------------------------- 1 | [ 4] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_double_close_to_zero.json: -------------------------------------------------------------------------------- 1 | [-0.000000000000000000000000000000000000000000000000000000000000000000000000000001] 2 | -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_int_with_exp.json: -------------------------------------------------------------------------------- 1 | [20e1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_minus_zero.json: -------------------------------------------------------------------------------- 1 | [-0] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_negative_int.json: -------------------------------------------------------------------------------- 1 | [-123] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_negative_one.json: -------------------------------------------------------------------------------- 1 | [-1] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_negative_zero.json: -------------------------------------------------------------------------------- 1 | [-0] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_real_capital_e.json: -------------------------------------------------------------------------------- 1 | [1E22] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_real_capital_e_neg_exp.json: -------------------------------------------------------------------------------- 1 | [1E-2] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_real_capital_e_pos_exp.json: -------------------------------------------------------------------------------- 1 | [1E+2] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_real_exponent.json: -------------------------------------------------------------------------------- 1 | [123e45] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_real_fraction_exponent.json: -------------------------------------------------------------------------------- 1 | [123.456e78] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_real_neg_exp.json: -------------------------------------------------------------------------------- 1 | [1e-2] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_real_pos_exponent.json: -------------------------------------------------------------------------------- 1 | [1e+2] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_simple_int.json: -------------------------------------------------------------------------------- 1 | [123] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_number_simple_real.json: -------------------------------------------------------------------------------- 1 | [123.456789] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object.json: -------------------------------------------------------------------------------- 1 | {"asd":"sdf", "dfg":"fgh"} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object_basic.json: -------------------------------------------------------------------------------- 1 | {"asd":"sdf"} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object_duplicated_key.json.skip: -------------------------------------------------------------------------------- 1 | {"a":"b","a":"c"} 2 | 3 | // we consider this an error -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object_duplicated_key_and_value.json.skip: -------------------------------------------------------------------------------- 1 | {"a":"b","a":"b"} 2 | 3 | // we consider this an error -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object_empty.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object_empty_key.json: -------------------------------------------------------------------------------- 1 | {"":0} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object_escaped_null_in_key.json: -------------------------------------------------------------------------------- 1 | {"foo\u0000bar": 42} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object_extreme_numbers.json: -------------------------------------------------------------------------------- 1 | { "min": -1.0e+28, "max": 1.0e+28 } -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object_long_strings.json: -------------------------------------------------------------------------------- 1 | {"x":[{"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}], "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object_simple.json: -------------------------------------------------------------------------------- 1 | {"a":[]} -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object_string_unicode.json: -------------------------------------------------------------------------------- 1 | {"title":"\u041f\u043e\u043b\u0442\u043e\u0440\u0430 \u0417\u0435\u043c\u043b\u0435\u043a\u043e\u043f\u0430" } -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_object_with_newlines.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": "b" 3 | } -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_1_2_3_bytes_UTF-8_sequences.json: -------------------------------------------------------------------------------- 1 | ["\u0060\u012a\u12AB"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_accepted_surrogate_pair.json: -------------------------------------------------------------------------------- 1 | ["\uD801\udc37"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_accepted_surrogate_pairs.json: -------------------------------------------------------------------------------- 1 | ["\ud83d\ude39\ud83d\udc8d"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_allowed_escapes.json: -------------------------------------------------------------------------------- 1 | ["\"\\\/\b\f\n\r\t"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_backslash_and_u_escaped_zero.json: -------------------------------------------------------------------------------- 1 | ["\\u0000"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_backslash_doublequotes.json: -------------------------------------------------------------------------------- 1 | ["\""] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_comments.json: -------------------------------------------------------------------------------- 1 | ["a/*b*/c/*d//e"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_double_escape_a.json: -------------------------------------------------------------------------------- 1 | ["\\a"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_double_escape_n.json: -------------------------------------------------------------------------------- 1 | ["\\n"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_escaped_control_character.json: -------------------------------------------------------------------------------- 1 | ["\u0012"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_escaped_noncharacter.json: -------------------------------------------------------------------------------- 1 | ["\uFFFF"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_in_array.json: -------------------------------------------------------------------------------- 1 | ["asd"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_in_array_with_leading_space.json: -------------------------------------------------------------------------------- 1 | [ "asd"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_last_surrogates_1_and_2.json: -------------------------------------------------------------------------------- 1 | ["\uDBFF\uDFFF"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_nbsp_uescaped.json: -------------------------------------------------------------------------------- 1 | ["new\u00A0line"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_nonCharacterInUTF-8_U+10FFFF.json: -------------------------------------------------------------------------------- 1 | ["􏿿"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_nonCharacterInUTF-8_U+FFFF.json: -------------------------------------------------------------------------------- 1 | ["￿"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_null_escape.json: -------------------------------------------------------------------------------- 1 | ["\u0000"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_one-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u002c"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_pi.json: -------------------------------------------------------------------------------- 1 | ["π"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_reservedCharacterInUTF-8_U+1BFFF.json: -------------------------------------------------------------------------------- 1 | ["𛿿"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_simple_ascii.json: -------------------------------------------------------------------------------- 1 | ["asd "] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_space.json: -------------------------------------------------------------------------------- 1 | " " -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json: -------------------------------------------------------------------------------- 1 | ["\uD834\uDd1e"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_three-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u0821"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_two-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u0123"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_u+2028_line_sep.json: -------------------------------------------------------------------------------- 1 | ["
"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_u+2029_par_sep.json: -------------------------------------------------------------------------------- 1 | ["
"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_uEscape.json: -------------------------------------------------------------------------------- 1 | ["\u0061\u30af\u30EA\u30b9"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_uescaped_newline.json: -------------------------------------------------------------------------------- 1 | ["new\u000Aline"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_unescaped_char_delete.json.skip: -------------------------------------------------------------------------------- 1 | [""] 2 | 3 | // we consider this an error -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_unicode.json: -------------------------------------------------------------------------------- 1 | ["\uA66D"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_unicodeEscapedBackslash.json: -------------------------------------------------------------------------------- 1 | ["\u005C"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_unicode_2.json: -------------------------------------------------------------------------------- 1 | ["⍂㈴⍂"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_unicode_U+10FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uDBFF\uDFFE"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_unicode_U+1FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uD83F\uDFFE"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json: -------------------------------------------------------------------------------- 1 | ["\u200B"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_unicode_U+2064_invisible_plus.json: -------------------------------------------------------------------------------- 1 | ["\u2064"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_unicode_U+FDD0_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uFDD0"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_unicode_U+FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uFFFE"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_unicode_escaped_double_quote.json: -------------------------------------------------------------------------------- 1 | ["\u0022"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_utf8.json: -------------------------------------------------------------------------------- 1 | ["€𝄞"] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_string_with_del_character.json.skip: -------------------------------------------------------------------------------- 1 | ["aa"] 2 | 3 | // we consider this an error -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_structure_lonely_false.json: -------------------------------------------------------------------------------- 1 | false -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_structure_lonely_int.json: -------------------------------------------------------------------------------- 1 | 42 -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_structure_lonely_negative_real.json: -------------------------------------------------------------------------------- 1 | -0.1 -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_structure_lonely_null.json: -------------------------------------------------------------------------------- 1 | null -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_structure_lonely_string.json: -------------------------------------------------------------------------------- 1 | "asd" -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_structure_lonely_true.json: -------------------------------------------------------------------------------- 1 | true -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_structure_string_empty.json: -------------------------------------------------------------------------------- 1 | "" -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_structure_trailing_newline.json: -------------------------------------------------------------------------------- 1 | ["a"] 2 | -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_structure_true_in_array.json: -------------------------------------------------------------------------------- 1 | [true] -------------------------------------------------------------------------------- /DataConfig/Tests/JSONTestSuiteParsing/y_structure_whitespace_array.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021-2025 Chen Tao 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Misc/Docs/.gitignore: -------------------------------------------------------------------------------- 1 | /book/ 2 | -------------------------------------------------------------------------------- /Misc/Docs/Source/Advanced/NonClassStructRoot.md: -------------------------------------------------------------------------------- 1 | # Non Class/Struct Root 2 | 3 | Sometimes you just want to deserialize something into an `TArray/TMap/TSet`. Then you'll realize that you don't have something corresponding to `StaticClass()/StaticStruct()` as root to pass to DataConfig. 4 | 5 | ```c++ 6 | // DataConfigTests/Private/DcTestBlurb2.cpp 7 | FString Fixture = TEXT("[1,2,3,4,5]"); 8 | TArray Arr; 9 | ``` 10 | 11 | Turns out you can create adhoc `FProperty` without `USTRUCT/UCLASS` parents and use them just fine. In DataConfig we've provided `DcPropertyUtils::FDcPropertyBuilder` to ease this use case. 12 | 13 | * [DcPropertyUtils.h]({{SrcRoot}}DataConfigCore/Public/DataConfig/Property/DcPropertyUtils.h) 14 | 15 | ```c++ 16 | // DataConfigTests/Private/DcTestBlurb2.cpp 17 | // create int array property 18 | using namespace DcPropertyUtils; 19 | auto ArrProp = FDcPropertyBuilder::Array( 20 | FDcPropertyBuilder::Int() 21 | ).LinkOnScope(); 22 | 23 | FDcJsonReader Reader{Fixture}; 24 | DC_TRY(DcAutomationUtils::DeserializeFrom(&Reader, FDcPropertyDatum(ArrProp.Get(), &Arr))); 25 | 26 | // validate results 27 | check(Arr.Num() == 5); 28 | check(Arr[4] == 5); 29 | ``` 30 | 31 | Note that `FDcPropertyBuilder` would create a heap allocated `FProperty` and `LinkOnScope()` returns a `TUniquePtr`. You might want to cache the properties if used repeatedly. 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Misc/Docs/Source/Advanced/README.md: -------------------------------------------------------------------------------- 1 | # Advanced 2 | 3 | This section contains documentation for advanced topics. -------------------------------------------------------------------------------- /Misc/Docs/Source/Examples/Images/Examples-BlueprintPrintToScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Examples/Images/Examples-BlueprintPrintToScreen.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Examples/Images/Examples-DebugDumpVecDatum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Examples/Images/Examples-DebugDumpVecDatum.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Examples/Images/Examples-OnBeginPlayDump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Examples/Images/Examples-OnBeginPlayDump.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Examples/README.md: -------------------------------------------------------------------------------- 1 | # Examples 2 | 3 | Here're some short and quick examples showcasing DataConfig API usage and features. All code shown here can be found in the [repo][1]. 4 | 5 | ## Blueprint Nodes 6 | 7 | If you integrated the full DataConfig plugin we have [Blueprint Nodes](../Extra/BlueprintNodes.md) for you to quickly try it out. 8 | 9 | Create a Blueprint Actor and setup the `BeginPlay` event like this: 10 | 11 | ![Examples OnBeginPlay Dump](./Images/Examples-OnBeginPlayDump.png) 12 | 13 | Then place the actor in the level and start play. The JSON string would be print to screen like this. 14 | 15 | ![Examples Blueprint PrintToScreen](./Images/Examples-BlueprintPrintToScreen.png) 16 | 17 | [1]: https://github.com/slowburn-dev/DataConfig/blob/release/DataConfig/Source/DataConfigTests/Private/DcTestBlurb.cpp "DcTestBlurb.cpp" -------------------------------------------------------------------------------- /Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-BlueprintClass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-BlueprintClass.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-BlueprintStruct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-BlueprintStruct.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-DumpAssetToLog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-DumpAssetToLog.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-DumpOutputLog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-DumpOutputLog.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-InstancedStructEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-InstancedStructEditor.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-LoadJsonIntoAbility.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Extra/Images/DataConfigEditorExtra-LoadJsonIntoAbility.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Extra/Images/DataConfigEngineExtra-BlueprintNodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Extra/Images/DataConfigEngineExtra-BlueprintNodes.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Extra/Images/DataConfigEngineExtra-BlueprintNodesDiagnostics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Extra/Images/DataConfigEngineExtra-BlueprintNodesDiagnostics.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Extra/NDJSON.md: -------------------------------------------------------------------------------- 1 | # NDJSON 2 | 3 | [NDJSON][1] is a popular extension to JSON that stores 1 JSON object per line. DataConfig's JSON parser and writer is flexible enough to easily support this use case. 4 | 5 | * [DcNDJSON.h]({{SrcRoot}}DataConfigExtra/Public/DataConfig/Extra/Misc/DcNDJSON.h) 6 | * [DcNDJSON.cpp]({{SrcRoot}}DataConfigExtra/Private/DataConfig/Extra/Misc/DcNDJSON.cpp) 7 | 8 | ```c++ 9 | // DataConfigExtra/Public/DataConfig/Extra/Misc/DcNDJSON.h 10 | template 11 | DATACONFIGEXTRA_API FDcResult LoadNDJSON(const TCHAR* Str, TArray& Arr) 12 | // ... 13 | template 14 | DATACONFIGEXTRA_API FDcResult SaveNDJSON(const TArray& Arr, FString& OutStr) 15 | // ... 16 | ``` 17 | 18 | With this method we can load a NDJSON string into a struct array and later serialize it back to NDJSON. 19 | 20 | ```c++ 21 | // DataConfig/Source/DataConfigExtra/Private/DataConfig/Extra/Misc/DcNDJSON.cpp 22 | FString Str = TEXT(R"( 23 | 24 | { "Name" : "Foo", "Id" : 1, "Type" : "Alpha" } 25 | { "Name" : "Bar", "Id" : 2, "Type" : "Beta" } 26 | { "Name" : "Baz", "Id" : 3, "Type" : "Gamma" } 27 | 28 | )"); 29 | 30 | UTEST_OK("Extra NDJSON", LoadNDJSON(*Str, Dest)); 31 | 32 | FString SavedStr; 33 | UTEST_OK("Extra NDJSON", SaveNDJSON(Dest, SavedStr)); 34 | ``` 35 | 36 | Note that our parser [supports common extension to JSON](../Formats/JSON.md#json-reader): 37 | 38 | - Allow C Style comments, i.e `/* block */` and `// line` . 39 | - Allow trailing comma, i.e `[1,2,3,],` . 40 | - Allow non object root. You can put a list as the root, or even string, numbers. 41 | 42 | [1]: http://ndjson.org/ 43 | -------------------------------------------------------------------------------- /Misc/Docs/Source/Extra/README.md: -------------------------------------------------------------------------------- 1 | # Extra 2 | 3 | Alongside `DataConfigCore` we have other modules `DataConfigExtra`, `DataConfigEngineExtra` and `DataConfigEditorExtra`. It have self contained samples built on top of DataConfig framework. 4 | 5 | Note that these are not intended to be integrated directly. You can take these as references when implementing custom features. -------------------------------------------------------------------------------- /Misc/Docs/Source/Extra/RootObject.md: -------------------------------------------------------------------------------- 1 | # Root Object 2 | 3 | Many modern JSON like data markup languages allows root level object and arrays, i.e omitting top level braces. This can be done in DataConfig with [custom serialize handlers](../Programming/SerializerDeserializer.md#handlers). 4 | 5 | * [DcSerDeRoot.h]({{SrcRoot}}DataConfigExtra/Public/DataConfig/Extra/SerDe/DcSerDeRoot.h) 6 | * [DcSerDeRoot.cpp]({{SrcRoot}}DataConfigExtra/Private/DataConfig/Extra/SerDe/DcSerDeRoot.cpp) 7 | 8 | 9 | ```c++ 10 | // DataConfigExtra/Private/DataConfig/Extra/SerDe/DcSerDeRoot.cpp 11 | // root object 12 | FString Str = TEXT(R"( 13 | 14 | "Name" : "Foo", 15 | "Id" : 253, 16 | "Type" : "Beta" 17 | 18 | )"); 19 | 20 | // equivalent fixture 21 | FDcExtraSimpleStruct Expect; 22 | Expect.Name = TEXT("Foo"); 23 | Expect.Id = 253; 24 | Expect.Type = EDcExtraTestEnum1::Beta; 25 | ``` 26 | 27 | 28 | ```c++ 29 | // DataConfigExtra/Private/DataConfig/Extra/SerDe/DcSerDeRoot.cpp 30 | // root list 31 | FString Str = TEXT(R"( 32 | 33 | "Alpha", 34 | "Beta", 35 | "Gamma" 36 | 37 | )"); 38 | 39 | // equivalent fixture 40 | TArray Expect = { 41 | EDcExtraTestEnum1::Alpha, 42 | EDcExtraTestEnum1::Beta, 43 | EDcExtraTestEnum1::Gamma}; 44 | ``` 45 | 46 | This can be a tiny QOL improvement for manually authoring JSON data. 47 | -------------------------------------------------------------------------------- /Misc/Docs/Source/Formats/Images/Deserialize-CopyReference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Formats/Images/Deserialize-CopyReference.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Formats/README.md: -------------------------------------------------------------------------------- 1 | # Formats 2 | 3 | This section contains documentation for supported formats. 4 | -------------------------------------------------------------------------------- /Misc/Docs/Source/Images/Integration-DataConfigAutomations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Images/Integration-DataConfigAutomations.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Images/Integration-DataConfigCoreOutput.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Images/Integration-DataConfigCoreOutput.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Images/Integration-DataConfigPlugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slowburn-dev/DataConfig/133ddb37d24acada0cb9acd46b60945b48aa7213/Misc/Docs/Source/Images/Integration-DataConfigPlugin.png -------------------------------------------------------------------------------- /Misc/Docs/Source/Programming/README.md: -------------------------------------------------------------------------------- 1 | # Programming Guides 2 | 3 | This section contains doc for programming DataConfig APIs. 4 | 5 | -------------------------------------------------------------------------------- /Misc/Docs/Source/README.md: -------------------------------------------------------------------------------- 1 | # DataConfig Book 2 | 3 | __Serialization framework for Unreal Engine that just works!__ 4 | 5 | [**DataConfig**][1] is a serialization framework built on top of Unreal Engine's Property System. It aims to be friendly and robust while offering good performance. Notably features: 6 | 7 | - Out of the box JSON/MsgPack read write. 8 | - Full support for `UPROPERTY()/UCLASS()/USTRUCT()/UENUM()`. 9 | - Pull/Push style API for verbatim data access and lossless type information. 10 | - Designed as a collection of tools that can be easily extended to support other formats. 11 | 12 | ## Getting Started 13 | 14 | - Get the code on [github][1]. 15 | - See [Examples](Examples/index.html) for examples. 16 | - See [Integration](Integration.md) for quick integration guide. 17 | - See [Design](Design.md) for more context about the project. 18 | - See [Extra](Extra/index.html) for more advanced usages. 19 | - See [Changes](Changes.md) for versioning history. 20 | 21 | There's also [DataConfig JSON Asset][2] on UE Marketplace. It's a premium plugin for importing JSON to UE data assets. 22 | 23 | ## License 24 | 25 | **DataConfig** is released under free and permissive MIT license. We'd really appreciate to credit us if you find it useful. See [License](License.md) for details. 26 | 27 | [1]: https://github.com/slowburn-dev/DataConfig "slowburn-dev/DataConfig" 28 | [2]: https://www.unrealengine.com/marketplace/en-US/product/dataconfig-json-asset "DataConfig JSON Asset" 29 | 30 | -------------------------------------------------------------------------------- /Misc/Docs/book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | title = "DataConfig Book" 3 | description = "Serialization framework for Unreal Engine that just works!" 4 | src = "Source" 5 | language = "en" 6 | 7 | [output.html] 8 | theme = "Theme" 9 | additional-css = ["custom.css"] 10 | site-url = "/dataconfig/" 11 | git-repository-url = "https://github.com/slowburn-dev/DataConfig" 12 | 13 | [output.html.fold] 14 | enable = false 15 | level = 0 16 | 17 | # https://gitlab.com/tglman/mdbook-variables 18 | [preprocessor.variables.variables] 19 | SrcRoot = "https://github.com/slowburn-dev/DataConfig/tree/release/DataConfig/Source/" 20 | RepoRoot = "https://github.com/slowburn-dev/DataConfig/tree/release/" 21 | 22 | # renamed fields 23 | [output.html.redirect] 24 | "/Formats/PipeProperty.html" = "./Formats/Property.html" 25 | "/Extra/Optional.html" = "../Advanced/Optional.html" 26 | -------------------------------------------------------------------------------- /Misc/Docs/custom.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --content-max-width: 1012px; 3 | } 4 | 5 | h2, h3 { margin-top: 1.5em; } 6 | h4, h5 { margin-top: 1em; } 7 | 8 | .nav-chapters { 9 | font-size: 1.2em; 10 | max-width: 64px; 11 | min-width: 48px; 12 | } 13 | 14 | p img { 15 | margin-left: auto; 16 | margin-right: auto; 17 | display: block; 18 | } -------------------------------------------------------------------------------- /Misc/Project/.gitignore: -------------------------------------------------------------------------------- 1 | # Visual Studio 2015 user specific files 2 | .vs/ 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | 22 | # Compiled Static libraries 23 | *.lai 24 | *.la 25 | *.a 26 | *.lib 27 | 28 | # Executables 29 | *.exe 30 | *.out 31 | *.app 32 | *.ipa 33 | 34 | # These project files can be generated by the engine 35 | *.xcodeproj 36 | *.xcworkspace 37 | *.sln 38 | *.suo 39 | *.opensdf 40 | *.sdf 41 | *.VC.db 42 | *.VC.opendb 43 | 44 | # Precompiled Assets 45 | SourceArt/**/*.png 46 | SourceArt/**/*.tga 47 | 48 | # Binary Files 49 | Binaries/* 50 | Plugins/*/Binaries/* 51 | 52 | # Builds 53 | Build/* 54 | 55 | # Whitelist PakBlacklist-.txt files 56 | !Build/*/ 57 | Build/*/** 58 | !Build/*/PakBlacklist*.txt 59 | 60 | # Don't ignore icon files in Build 61 | !Build/**/*.ico 62 | 63 | # Built data for maps 64 | *_BuiltData.uasset 65 | 66 | # Configuration files generated by the Editor 67 | Saved/* 68 | 69 | # Compiled source files for the engine to use 70 | Intermediate/* 71 | Plugins/*/Intermediate/* 72 | 73 | # Cache files for the editor to use 74 | DerivedDataCache/* 75 | -------------------------------------------------------------------------------- /Misc/Project/DcProject4.uproject: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Modules": [ 4 | { 5 | "Name": "DcProjectGame", 6 | "Type": "Runtime", 7 | "LoadingPhase": "Default" 8 | } 9 | ], 10 | "DisableEnginePluginsByDefault" : true, 11 | "Plugins": [ 12 | { 13 | "Name": "PluginBrowser", 14 | "Enabled": true 15 | }, 16 | { 17 | "Name": "ContentBrowserAssetDataSource", 18 | "Enabled": true 19 | }, 20 | { 21 | "Name": "ContentBrowserClassDataSource", 22 | "Enabled": true 23 | }, 24 | { 25 | "Name": "ContentBrowserFileDataSource", 26 | "Enabled": true 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /Misc/Project/DcProject5.uproject: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Modules": [ 4 | { 5 | "Name": "DcProjectGame", 6 | "Type": "Runtime", 7 | "LoadingPhase": "Default" 8 | } 9 | ], 10 | "DisableEnginePluginsByDefault": true, 11 | "Plugins": [ 12 | { 13 | "Name": "PluginBrowser", 14 | "Enabled": true 15 | }, 16 | { 17 | "Name": "ContentBrowserAssetDataSource", 18 | "Enabled": true 19 | }, 20 | { 21 | "Name": "ContentBrowserClassDataSource", 22 | "Enabled": true 23 | }, 24 | { 25 | "Name": "ContentBrowserFileDataSource", 26 | "Enabled": true 27 | }, 28 | { 29 | "Name": "ModularGameplay", 30 | "Enabled": true 31 | }, 32 | { 33 | "Name": "GameFeatures", 34 | "Enabled": true 35 | }, 36 | { 37 | "Name": "PropertyAccessEditor", 38 | "Enabled": true 39 | }, 40 | { 41 | "Name": "PropertyAccessNode", 42 | "Enabled": true 43 | } 44 | ] 45 | } -------------------------------------------------------------------------------- /Misc/Project/README.md: -------------------------------------------------------------------------------- 1 | **Sample Project** 2 | 3 | UnrealEngine needs to operate on a actual project for plugins and editor modules to work. 4 | 5 | This serves as a minimal sample project that can be used to build DataConfig in a editor environment. 6 | 7 | - Use `DcProject4.uproject` for UE4 8 | - Use `DcProject5.uproject` for UE5 9 | 10 | ``` 11 | # build 12 | C:\UnrealEngine\Engine\Binaries\DotNET\UnrealBuildTool DcProjectEditor Win64 Development "%CD%/DcProject.uproject" -Rocket -NoHotReload 13 | 14 | # generate VS solution 15 | C:\UnrealEngine\Engine\Binaries\DotNET\UnrealBuildTool DcProjectEditor Win64 Development "%CD%/DcProject.uproject" -Rocket -ProjectFiles -Game -Engine -NoIntellisense 16 | 17 | # run editor 18 | C:\UnrealEngine\Engine\Binaries\Win64\UE4Editor "%CD%/DcProject.uproject" 19 | ``` -------------------------------------------------------------------------------- /Misc/Project/Source/DataConfigHeadless.Target.cs: -------------------------------------------------------------------------------- 1 | // Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | using System.Collections.Generic; 5 | 6 | // ! this is a horrible hack to make UBT projectfiles generation pass 7 | // ! dont try to build this target though 8 | public class DataConfigHeadlessTarget : TargetRules 9 | { 10 | public DataConfigHeadlessTarget(TargetInfo Target) : base(Target) 11 | { 12 | DefaultBuildSettings = BuildSettingsVersion.V2; 13 | Type = TargetType.Editor; 14 | LaunchModuleName = "DataConfigHeadless"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Misc/Project/Source/DcProject.Target.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | 3 | public class DcProjectTarget : TargetRules 4 | { 5 | public DcProjectTarget(TargetInfo Target) : base(Target) 6 | { 7 | Type = TargetType.Game; 8 | DefaultBuildSettings = BuildSettingsVersion.V2; 9 | ExtraModuleNames.AddRange( new string[] { "DcProjectGame" } ); 10 | 11 | #if UE_5_1_OR_LATER 12 | IncludeOrderVersion = EngineIncludeOrderVersion.Latest; 13 | #endif 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Misc/Project/Source/DcProjectEditor.Target.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | 3 | public class DcProjectEditorTarget : TargetRules 4 | { 5 | public DcProjectEditorTarget(TargetInfo Target) : base(Target) 6 | { 7 | Type = TargetType.Editor; 8 | DefaultBuildSettings = BuildSettingsVersion.V2; 9 | ExtraModuleNames.AddRange( new string[] { "DcProjectGame", "DcProjectEditor", } ); 10 | 11 | #if UE_5_1_OR_LATER 12 | IncludeOrderVersion = EngineIncludeOrderVersion.Latest; 13 | #endif 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Misc/Project/Source/DcProjectEditor/DcProjectEditor.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | 3 | public class DcProjectEditor : ModuleRules 4 | { 5 | public DcProjectEditor(ReadOnlyTargetRules Target) : base(Target) 6 | { 7 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 8 | #if UE_5_2_OR_LATER 9 | IWYUSupport = IWYUSupport.Full; 10 | #else 11 | bEnforceIWYU = true; 12 | #endif 13 | 14 | 15 | PublicDependencyModuleNames.AddRange(new string[] { 16 | "Core", 17 | "CoreUObject", 18 | "Engine" 19 | }); 20 | PrivateDependencyModuleNames.AddRange(new string[] { 21 | "DcProjectGame", 22 | }); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Misc/Project/Source/DcProjectEditor/Private/DcProjectEditor.cpp: -------------------------------------------------------------------------------- 1 | #include "DcProjectEditor.h" 2 | #include "DcProjectGame.h" 3 | #include "Modules/ModuleManager.h" 4 | 5 | void FDcProjectEditor::StartupModule() 6 | { 7 | UE_LOG(LogDcProjectGame, Log, TEXT("DcProjectEditor module starting up")); 8 | } 9 | 10 | void FDcProjectEditor::ShutdownModule() 11 | { 12 | UE_LOG(LogDcProjectGame, Log, TEXT("DcProjectEditor module shutting down")); 13 | } 14 | 15 | IMPLEMENT_MODULE(FDcProjectEditor, DcProjectEditor); 16 | -------------------------------------------------------------------------------- /Misc/Project/Source/DcProjectEditor/Public/DcProjectEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "Modules/ModuleManager.h" 5 | #include "Modules/ModuleInterface.h" 6 | 7 | class FDcProjectEditor : public IModuleInterface 8 | { 9 | public: 10 | static inline FDcProjectEditor& Get() 11 | { 12 | return FModuleManager::LoadModuleChecked("DcProjectEditor"); 13 | } 14 | 15 | static inline bool IsAvailable() 16 | { 17 | return FModuleManager::Get().IsModuleLoaded("DcProjectEditor"); 18 | } 19 | 20 | virtual void StartupModule() override; 21 | virtual void ShutdownModule() override; 22 | }; 23 | -------------------------------------------------------------------------------- /Misc/Project/Source/DcProjectGame/DcProjectGame.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | 3 | public class DcProjectGame : ModuleRules 4 | { 5 | public DcProjectGame(ReadOnlyTargetRules Target) : base(Target) 6 | { 7 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 8 | #if UE_5_2_OR_LATER 9 | IWYUSupport = IWYUSupport.Full; 10 | #else 11 | bEnforceIWYU = true; 12 | #endif 13 | 14 | 15 | PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine" }); 16 | PrivateDependencyModuleNames.AddRange(new string[] { }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Misc/Project/Source/DcProjectGame/Private/DcProjectGame.cpp: -------------------------------------------------------------------------------- 1 | #include "DcProjectGame.h" 2 | #include "Modules/ModuleManager.h" 3 | 4 | DEFINE_LOG_CATEGORY(LogDcProjectGame); 5 | 6 | void FDcProjectGame::StartupModule() 7 | { 8 | UE_LOG(LogDcProjectGame, Log, TEXT("DcProjectGame module starting up")); 9 | } 10 | 11 | void FDcProjectGame::ShutdownModule() 12 | { 13 | UE_LOG(LogDcProjectGame, Log, TEXT("DcProjectGame module shutting down")); 14 | } 15 | 16 | IMPLEMENT_PRIMARY_GAME_MODULE(FDcProjectGame, DcProjectGame, "DcProjectGame"); 17 | -------------------------------------------------------------------------------- /Misc/Project/Source/DcProjectGame/Public/DcProjectGame.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "Modules/ModuleInterface.h" 5 | 6 | DCPROJECTGAME_API DECLARE_LOG_CATEGORY_EXTERN(LogDcProjectGame, All, All); 7 | 8 | class FDcProjectGame : public IModuleInterface 9 | { 10 | public: 11 | static inline FDcProjectGame& Get() 12 | { 13 | return FModuleManager::LoadModuleChecked("DcProjectGame"); 14 | } 15 | 16 | static inline bool IsAvailable() 17 | { 18 | return FModuleManager::Get().IsModuleLoaded("DcProjectGame"); 19 | } 20 | 21 | virtual void StartupModule() override; 22 | virtual void ShutdownModule() override; 23 | }; 24 | -------------------------------------------------------------------------------- /Misc/Scripts/make_dataconfig_ue4.py: -------------------------------------------------------------------------------- 1 | import sys 2 | assert sys.version_info.major == 3 and sys.version_info.minor >= 4, "needs python >= 3.4" 3 | 4 | import os 5 | from pathlib import Path 6 | import shutil 7 | 8 | def _copy(src_path, dest_path): 9 | shutil.copy(str(src_path), str(dest_path)) 10 | 11 | def _copytree(src_path, dest_path): 12 | shutil.copytree(str(src_path), str(dest_path), dirs_exist_ok=True) 13 | 14 | root = Path(os.path.abspath(__file__)).parent.parent.parent 15 | plugin = root / "Tmp/UE4/DataConfig" 16 | plugin.mkdir(parents=True, exist_ok=True) 17 | 18 | # copy uplugin 19 | root_uplugin = root / "DataConfig/DataConfig4.uplugin" 20 | plugin_uplugin = plugin / "DataConfig.uplugin" 21 | _copy(root_uplugin, plugin_uplugin) 22 | 23 | # copy sources 24 | root_src = root / "DataConfig/Source" 25 | plugin_src = plugin / "Source" 26 | plugin_src.mkdir(parents=True, exist_ok=True) 27 | 28 | _copytree(root_src / "DataConfigCore", plugin_src / "DataConfigCore") 29 | _copytree(root_src / "DataConfigExtra", plugin_src / "DataConfigExtra") 30 | _copytree(root_src / "DataConfigTests", plugin_src / "DataConfigTests") 31 | _copytree(root_src / "DataConfigEngineExtra", plugin_src / "DataConfigEngineExtra") 32 | _copytree(root_src / "DataConfigEditorExtra", plugin_src / "DataConfigEditorExtra") 33 | 34 | # copy others 35 | _copytree(root / "DataConfig/Content", plugin / "Content") 36 | _copytree(root / "DataConfig/Tests", plugin / "Tests") 37 | 38 | print("copied clean DataConfig UE4 to: %s" % plugin) 39 | os.startfile(str(plugin.parent)) 40 | --------------------------------------------------------------------------------