Спасибо за помощь

двоил отличный проектВоти только что бездельничал с этим, учась немного пойти. Моя проблема, которую я не могу понять, это некоторые вещи о нестандартном демаршалингеВот вы можете увидеть это немаршалThing структура, которая содержитData interface{} поле, которое затем распаковывается с помощьюKind string поле. Все это прекрасно работает, кроме вложенных ситуаций. Так что лучше всего это пример:

Просто скажи, что у тебя естьThing структура это своего родаlisting, Таким образомThing.Data это неправильно набиратьlisting, затемlisting имеет 3Children типаlink который проводится вChildren []Thing поле. Эти Дети заканчивают тем, что были типаmap[string]interface {} это моя проблема. Как я могу отключить это через вложенные данные? Таким образомChildren.Data также неустранимый. Есть ли способ сделать это на ходу, или мне придется написать большой цикл или алгоритм рекурсии? Пожалуйста, дайте мне знать, что вы думаете, или если я смотрю на эту ситуацию совершенно неправильно. Спасибо

ОБНОВИТЬ Вот образец JSON

{
    "kind": "Listing",
    "data": {
        "after": null,
        "dist": 10,
        "facets": {},
        "modhash": null,
        "whitelist_status": "all_ads",
        "children": [
            {
                "kind": "t3",
                "data": {
                    "domain": "self.nanocurrency",
                    "approved_at_utc": null,
                    "mod_reason_by": null,
                    "banned_by": null,
                    "num_reports": null,
                    "subreddit_id": "t5_2wlj3",
                    "thumbnail_width": null,
                    "subreddit": "CryptoCurrency",
                    "selftext_html": null,
                    "selftext": "",
                    "likes": null,
                    "suggested_sort": null,
                    "crosspost_parent_list": [
                        {
                            "domain": "self.nanocurrency",
                            "approved_at_utc": null,
                            "mod_reason_by": null,
                            "banned_by": null,
                            "num_reports": null,
                            "subreddit_id": "t5_4br49",
                            "thumbnail_width": null,
                            "subreddit": "nanocurrency",
                            "selftext_html": "<!-- SC_OFF --><div class=\"md\"><p>Seeing lots of comments about the lack of timestamps in the protocol, and just wanted to provide some information on why objectively accurate, global time timestamps are an illusion in decentralized systems. Logical time on the other hand is achievable and is in fact achieved in Nano via the individual block chains and the directed, acyclic graph (DAG). </p>\n\n<p>Generally, in a decentralized, distributed system, only logical time (C happened after B happened after A) can be agreed on globally (e.g. Lamport time: <a href=\"https://amturing.acm.org/p558-lamport.pdf\">https://amturing.acm.org/p558-lamport.pdf</a> or vector clocks). This is what the nano ledger does via chaining blocks, just as any other blockchain. Then it connects those chains via a DAG. Syncing global time to logical time is a hard problem that can either be approached via a consensus approach which is prone to sybil attacks, via a probabilistic approach which is what most blockchains go with - essentially relying on their peers - or a centralized approach like NTP which is a no-go in a decentralized system. If you're interested, check e.g. this paper: <a href=\"http://soft.vub.ac.be/%7Etvcutsem/distsys/clocks.pdf\">http://soft.vub.ac.be/~tvcutsem/distsys/clocks.pdf</a></p>\n\n<p>So what you're running into is the problem that while theoretically all or a relevant subset of nodes within the Nano or Bitcoin or Ethereum network could agree to call a certain time "Monday February 12 2018 20:35:23", this timestamp could still be incorrect vs the outside world.</p>\n\n<p>That's why any accurate global timestamps in software today rely on centralized information and trusted entities. The only way this can change is if machines start setting their clocks on their own accurately (e.g. chip-scale atomic clocks)</p>\n\n<p>Some people think this is bad news for Nano because in traditional blockchain, timestamps are fairly important because they are used in new block validation: <a href=\"http://culubas.blogspot.co.uk/2011/05/timejacking-bitcoin_802.html\">http://culubas.blogspot.co.uk/2011/05/timejacking-bitcoin_802.html</a> . Timestamps are a blessing and a curse at the same time in blockchain: They allow for timing and validation of blocks and therefore regulation of coin mining, but also allow for timestamp double spend attacks. Since Nano does not use mining, it is not susceptible to those attacks.</p>\n\n<p>Even with the relative importance of time and timestamps in Bitcoin, timestamp in Bitcoin are not guaranteed to be corresponding to logical time on the chain. Here's the bitcoin wiki talking about the bitcoin block timestamp: <a href=\"https://en.bitcoin.it/wiki/Block_timestamp\">https://en.bitcoin.it/wiki/Block_timestamp</a> </p>\n\n<blockquote>\n<p>A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours. "Network-adjusted time" is the median of the timestamps returned by all nodes connected to you. As a result, block timestamps are not exactly accurate, and they do not even need to be in order. Block times are accurate only to within an hour or two. </p>\n</blockquote>\n\n<p>This is probably as good as it gets. Still no ordering guarantees though, and a possibilities for attacks which have been discussed again and again. There are certain guards in Bitcoin code to prevent these from happening. </p>\n\n<p>So if you have somebody lecturing you about how architecturally superior coins would have a accurate and monotonically increasing timestamps, point them here, or here: <a href=\"https://cointelegraph.com/news/timestamp-hacking-debunking-the-myth-of-precision-timestamps\">https://cointelegraph.com/news/timestamp-hacking-debunking-the-myth-of-precision-timestamps</a></p>\n\n<p>Would timestamps be convenient to have on the protocol? Yes, and that would likely be a good reason to include them. Are timestamps accurately depicting global time, and can they be used as evidence in any chain? No they can't.</p>\n\n<p>Why are we seeing inaccurate timestamps in the block explorer? Because these are kept in a db outside of the ledger and have been set January 19. Nothing more to it.</p>\n\n<p>Why do people like to babble about how this is a weakness in Nano? No clue.</p>\n</div><!-- SC_ON -->",
                            "selftext": "Seeing lots of comments about the lack of timestamps in the protocol, and just wanted to provide some information on why objectively accurate, global time timestamps are an illusion in decentralized systems. Logical time on the other hand is achievable and is in fact achieved in Nano via the individual block chains and the directed, acyclic graph (DAG). \n\nGenerally, in a decentralized, distributed system, only logical time (C happened after B happened after A) can be agreed on globally (e.g. Lamport time: https://amturing.acm.org/p558-lamport.pdf or vector clocks). This is what the nano ledger does via chaining blocks, just as any other blockchain. Then it connects those chains via a DAG. Syncing global time to logical time is a hard problem that can either be approached via a consensus approach which is prone to sybil attacks, via a probabilistic approach which is what most blockchains go with - essentially relying on their peers - or a centralized approach like NTP which is a no-go in a decentralized system. If you're interested, check e.g. this paper: http://soft.vub.ac.be/~tvcutsem/distsys/clocks.pdf\n\nSo what you're running into is the problem that while theoretically all or a relevant subset of nodes within the Nano or Bitcoin or Ethereum network could agree to call a certain time \"Monday February 12 2018 20:35:23\", this timestamp could still be incorrect vs the outside world.\n\nThat's why any accurate global timestamps in software today rely on centralized information and trusted entities. The only way this can change is if machines start setting their clocks on their own accurately (e.g. chip-scale atomic clocks)\n\nSome people think this is bad news for Nano because in traditional blockchain, timestamps are fairly important because they are used in new block validation: http://culubas.blogspot.co.uk/2011/05/timejacking-bitcoin_802.html . Timestamps are a blessing and a curse at the same time in blockchain: They allow for timing and validation of blocks and therefore regulation of coin mining, but also allow for timestamp double spend attacks. Since Nano does not use mining, it is not susceptible to those attacks.\n\nEven with the relative importance of time and timestamps in Bitcoin, timestamp in Bitcoin are not guaranteed to be corresponding to logical time on the chain. Here's the bitcoin wiki talking about the bitcoin block timestamp: https://en.bitcoin.it/wiki/Block_timestamp \n\n> A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours. \"Network-adjusted time\" is the median of the timestamps returned by all nodes connected to you. As a result, block timestamps are not exactly accurate, and they do not even need to be in order. Block times are accurate only to within an hour or two. \n\nThis is probably as good as it gets. Still no ordering guarantees though, and a possibilities for attacks which have been discussed again and again. There are certain guards in Bitcoin code to prevent these from happening. \n\nSo if you have somebody lecturing you about how architecturally superior coins would have a accurate and monotonically increasing timestamps, point them here, or here: https://cointelegraph.com/news/timestamp-hacking-debunking-the-myth-of-precision-timestamps\n\nWould timestamps be convenient to have on the protocol? Yes, and that would likely be a good reason to include them. Are timestamps accurately depicting global time, and can they be used as evidence in any chain? No they can't.\n\nWhy are we seeing inaccurate timestamps in the block explorer? Because these are kept in a db outside of the ledger and have been set January 19. Nothing more to it.\n\nWhy do people like to babble about how this is a weakness in Nano? No clue.",
                            "likes": null,
                            "suggested_sort": null,
                            "user_reports": [],
                            "secure_media": null,
                            "is_reddit_media_domain": false,
                            "link_flair_text": null,
                            "id": "7ww6bm",
                            "banned_at_utc": null,
                            "mod_reason_title": null,
                            "view_count": null,
                            "archived": false,
                            "clicked": false,
                            "media_embed": {},
                            "report_reasons": null,
                            "author": "ohlookaballoon",
                            "num_crossposts": 2,
                            "saved": false,
                            "mod_reports": [],
                            "can_mod_post": false,
                            "is_crosspostable": true,
                            "pinned": false,
                            "score": 24,
                            "approved_by": null,
                            "over_18": false,
                            "hidden": false,
                            "thumbnail": "self",
                            "edited": false,
                            "link_flair_css_class": null,
                            "author_flair_css_class": null,
                            "contest_mode": false,
                            "gilded": 0,
                            "downs": 0,
                            "brand_safe": false,
                            "secure_media_embed": {},
                            "removal_reason": null,
                            "author_flair_text": null,
                            "stickied": false,
                            "can_gild": true,
                            "thumbnail_height": null,
                            "parent_whitelist_status": null,
                            "name": "t3_7ww6bm",
                            "spoiler": false,
                            "permalink": "/r/nanocurrency/comments/7ww6bm/why_global_time_objectively_accurate_timestamps/",
                            "subreddit_type": "public",
                            "locked": false,
                            "hide_score": false,
                            "created": 1518417258,
                            "url": "https://www.reddit.com/r/nanocurrency/comments/7ww6bm/why_global_time_objectively_accurate_timestamps/",
                            "whitelist_status": null,
                            "quarantine": false,
                            "title": "Why global time, objectively accurate timestamps are not achievable in decentralized systems",
                            "created_utc": 1518388458,
                            "subreddit_name_prefixed": "r/nanocurrency",
                            "ups": 24,
                            "media": null,
                            "num_comments": 18,
                            "is_self": true,
                            "visited": false,
                            "mod_note": null,
                            "is_video": false,
                            "distinguished": null
                        }
                    ],
                    "user_reports": [],
                    "secure_media": null,
                    "is_reddit_media_domain": false,
                    "link_flair_text": null,
                    "id": "7x3r45",
                    "banned_at_utc": null,
                    "mod_reason_title": null,
                    "view_count": null,
                    "archived": false,
                    "clicked": false,
                    "media_embed": {},
                    "report_reasons": null,
                    "author": "ohlookaballoon",
                    "num_crossposts": 0,
                    "saved": false,
                    "mod_reports": [],
                    "can_mod_post": false,
                    "is_crosspostable": true,
                    "pinned": false,
                    "score": 2,
                    "approved_by": null,
                    "over_18": false,
                    "hidden": false,
                    "thumbnail": "default",
                    "edited": false,
                    "link_flair_css_class": null,
                    "author_flair_css_class": "New",
                    "contest_mode": false,
                    "gilded": 0,
                    "downs": 0,
                    "brand_safe": true,
                    "secure_media_embed": {},
                    "removal_reason": null,
                    "author_flair_text": "Redditor for 27 days.",
                    "stickied": false,
                    "can_gild": true,
                    "thumbnail_height": null,
                    "parent_whitelist_status": "all_ads",
                    "name": "t3_7x3r45",
                    "crosspost_parent": "t3_7ww6bm",
                    "spoiler": false,
                    "permalink": "/r/CryptoCurrency/comments/7x3r45/why_global_time_objectively_accurate_timestamps/",
                    "subreddit_type": "public",
                    "locked": false,
                    "hide_score": false,
                    "created": 1518496223,
                    "url": "https://np.reddit.com/r/nanocurrency/comments/7ww6bm/why_global_time_objectively_accurate_timestamps/",
                    "whitelist_status": "all_ads",
                    "quarantine": false,
                    "title": "Why global time, objectively accurate timestamps are not achievable in decentralized systems",
                    "created_utc": 1518467423,
                    "subreddit_name_prefixed": "r/CryptoCurrency",
                    "ups": 2,
                    "media": null,
                    "num_comments": 0,
                    "is_self": false,
                    "visited": false,
                    "mod_note": null,
                    "is_video": false,
                    "distinguished": null
                }
            },

Ответы на вопрос(0)

Ваш ответ на вопрос