JSON import context help

Created on 20 October 2024, 2 months ago

Problem/Motivation

I am attempting to map the results item list in this api query to drupal feed items.

https://api.kasplex.org/v1/krc20/tokenlist

{"message":"successful","prev":"930705180015","next":"925572590001","result":[{"tick":"KASBRO","max":"2870000000000000000","lim":"2870000000000","pre":"0","to":"kaspa:qqugw64dajgcpxjs2t8qe8xhf8c7x98ucn0z2lk30mf8xdkcpdx0vst43ds2u","dec":"8","minted":"7304150000000000","opScoreAdd":"930705180015","opScoreMod":"930860000000","state":"deployed","hashRev":"28cd568f82c0045cfda94775cc65b8fa6c57123c383a547c3737a28dfb1f5839","mtsAdd":"1729376146268"},{"tick":"LOSER","max":"2100000000000000","lim":"420000000000","pre":"420000000000000","to":"kaspa:qzsnpvwm8k2kykkul3h0ggf8eqajnptptu2y5py4e645w5mdwyssymgncv59n","dec":"8","minted":"1059240000000000","opScoreAdd":"930683390007","opScoreMod":"930827790000","state":"deployed","hashRev":"13048aa50fc9ddd6e933ea7555c71096f1574745baecb04a1412f69504810996","mtsAdd":"1729373891949"},{"tick":"KEGG","max":"28700000000000000","lim":"287000000000","pre":"0","to":"kaspa:qrre687rh3e5vy39ja04t9hhhagk7w639slfm93p3dhepvrddncmcyr8402mz","dec":"8","minted":"5025083000000000","opScoreAdd":"930587510008","opScoreMod":"930847350001","state":"deployed","hashRev":"25f35f71b2a7e0c1d2b7a99ee1681a45765f1a49285e1cd555882ee7e3b3345b","mtsAdd":"1729364393532"},{"tick":"WAGMI","max":"42069000000000000","lim":"4206900000000","pre":"0","to":"kaspa:qq4hws3ewum9nnalhwyz4plfku46vu9qhjjjkh4nh99cvqnz5wavytez2h33f","dec":"8","minted":"42069000000000000","opScoreAdd":"930577020010","opScoreMod":"930582880135","state":"finished","hashRev":"d86a60f668c0a0efb244804097bea33c32c777299d2ee7ab6d2edf33c9f9eca4","mtsAdd":"1729363337798"}, ...

Steps to reproduce

I created a feed type and set download url fetcher to jsonpath.

On the Mapping page for the feed type, I have set the context to $.result.*

I do not see any Feed Item options in the mapping target.

What are the steps I am missing to map the results of the json api to feed items?

Thanks very much!

πŸ’¬ Support request
Status

Active

Component

JSONPath parser

Created by

πŸ‡ΊπŸ‡ΈUnited States j9

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @j9
  • πŸ‡³πŸ‡±Netherlands megachriz

    I see that the url you provided, for example returns the following item:

    "tick": "GEME",
    "max": "2100000000000000",
    "lim": "10000000000",
    "pre": "0",
    "to": "kaspa:qpw62u93wvng9t3kjzmp3cyr37zwkwppjf7l0s7kc7yhp08xmqu3kqguyhgap",
    "dec": "8",
    "minted": "151520000000000",
    "opScoreAdd": "932033290104",
    "opScoreMod": "932041480279",
    "state": "deployed",
    "hashRev": "b2a756ac793d78d689be807274786f91a2ef515e01bac2acd68224057026466e",
    "mtsAdd": "1729508652381"
    

    Each property of the above could be mapped to a field defined on the entity type that you are importing data for.

    For example, the JSON souce "tick" could be mapped to node title.

    Does this answer your question? If not, feel free to reopen this issue. Maybe provide a screenshot in that case, because I am not sure what you mean with "I do not see any Feed Item options in the mapping target.".

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024