Skip to content

Incomplete data parsed #21

@ByMykel

Description

@ByMykel

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"
            }
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions