Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete data parsed #21

Open
ByMykel opened this issue Jan 26, 2025 · 0 comments
Open

Incomplete data parsed #21

ByMykel opened this issue Jan 26, 2025 · 0 comments

Comments

@ByMykel
Copy link

ByMykel commented Jan 26, 2025

This piece of code is from cs2 items_game.txt file. In the example below you can see that only the last object is present in seasonaloperations.

Input:

"seasonaloperations"
    {
        "11"
        {
            "redeemable_goods"      "xpshop"
            "operational_point_redeemable"
            {
                "points"        "4"
                "item_name"     "lootlist:set_overpass_2024"
                "ui_order"      "2"
                "callout"       "#CSGO_set_overpass_2024_short"
                "ui_image_thumbnail"        "backgrounds/xpshop/set_overpass_2024_thumbnail"
            }
            "operational_point_redeemable"
            {
                "points"        "4"
                "item_name"     "lootlist:set_graphic_design"
                "ui_order"      "2"
                "callout"       "#CSGO_set_graphic_design_short"
                "ui_image_thumbnail"        "backgrounds/xpshop/set_graphic_design_thumbnail"
            }
            "operational_point_redeemable"
            {
                "points"        "4"
                "item_name"     "lootlist:set_realism_camo"
                "ui_order"      "2"
                "callout"       "#CSGO_set_realism_camo_short"
                "ui_image_thumbnail"        "backgrounds/xpshop/set_realism_camo_thumbnail"
            }
            "operational_point_redeemable"
            {
                "points"        "2"
                "flags"     "2"
                "item_name"     "crate_community_34"
                "callout"       "#CSGO_crate_community_34"
                "ui_image_thumbnail"        "backgrounds/xpshop/crate_community_34_thumbnail"
                "ui_order"      "3"
            }
            "operational_point_redeemable"
            {
                "points"        "3"
                "item_name"     "lootlist:keychain_pack_kc_missinglink_lootlist"
                "ui_order"      "1"
                "flags"     "1"
                "ui_image_thumbnail"        "backgrounds/xpshop/kc_missinglink_thumbnail"
                "ui_set_image"      "set_kc_missinglink"
                "callout"       "#CSGO_crate_keychain_pack_kc_missinglink_capsule_short"
            }
            "operational_point_redeemable"
            {
                "points"        "3"
                "item_name"     "lootlist:keychain_pack_kc_weapon_01_lootlist"
                "ui_order"      "1"
                "flags"     "1"
                "ui_image_thumbnail"        "backgrounds/xpshop/kc_weapon_01_thumbnail"
                "ui_set_image"      "set_kc_weapon_01"
                "callout"       "#CSGO_crate_keychain_pack_kc_weapon_01_capsule_short"
            }
            "operational_point_redeemable"
            {
                "points"        "1"
                "item_name"     "lootlist:sticker_pack_stkr_craft_01_lootlist"
                "ui_order"      "3"
                "ui_image_thumbnail"        "backgrounds/xpshop/stkr_craft_01_thumbnail"
                "ui_set_image"      "set_stkr_craft_01"
                "callout"       "#CSGO_crate_sticker_pack_stkr_craft_01_short"
            }
            "operational_point_redeemable"
            {
                "points"        "1"
                "item_name"     "lootlist:sticker_pack_stkr_craft_02_lootlist"
                "ui_order"      "3"
                "ui_image_thumbnail"        "backgrounds/xpshop/stkr_craft_02_thumbnail"
                "ui_set_image"      "set_stkr_craft_02"
                "callout"       "#CSGO_crate_sticker_pack_stkr_craft_02_short"
            }
        }
    }

Output:

{
    "seasonaloperations": {
        "11": {
            "redeemable_goods": "xpshop",
            "operational_point_redeemable": {
                "points": 1,
                "item_name": "lootlist:sticker_pack_stkr_craft_02_lootlist",
                "ui_order": 3,
                "callout": "#CSGO_crate_sticker_pack_stkr_craft_02_short",
                "ui_image_thumbnail": "backgrounds/xpshop/stkr_craft_02_thumbnail",
                "flags": 1,
                "ui_set_image": "set_stkr_craft_02"
            }
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant