KilledByAPixel / JSONCrush

Compress JSON into URL friendly strings
https://killedbyapixel.github.io/JSONCrush
MIT License
1.57k stars 45 forks source link

Unable to shorten generated url #19

Closed microbecode closed 2 years ago

microbecode commented 2 years ago

JSONCrush gives me a generated URL:

https://evmconnector.dev/load/('a!'0xa652dd22ad2059c31ee27a7a5eb9399c7336dad7'~f![('n!'allowanceEGHMHYI-approve*DauthorizeSW*H.-bZI-currentStakeEGHMHYIMIMIMQ-decimalsXpureNYuint8q-deRDdeposit*I.-domainSeparatorV4EYbytes32q-emergencyPause*Q.-inRDinitializeK.-mintJuice*LMuint256[]q.-namejownerEYH-pausedEYQ-renounceOwnershipK.-sWEYH-symboljtotalSupplyEYI-U*DUFrom*HMDUOwnership*H.-unstakedBZI-updatePriceOracles*LML_*H_AndCallXpayableNGHMbytesq.-withdraw*I.])])*KG-]),('n!'.]~o![DHMIYQ-EXviewNG('t!'HaddressqIuint256qKXnonpayableNLaddress[]qM,GN'~i![QboolqRcreaseAllowance*UtransferWignalAggregatorX'~t!'Y.GZalanceOfEGHY_.-upgradeTojEYstringq-q')qj_ZYXWURQNMLKIHGED.-*_

Because of the 'header start' character towards the end, I'm unable to enter the URL in any URL shortener service, such as tinyurl.com . I need to have the URL shortened because I need to paste it into Slack and Slack cuts the URL at the same special character.

Any ideas? Thanks

KilledByAPixel commented 2 years ago

I have it set so it appends an extra character to end which is ignored to fix issues I was having like this. It was _ but I guess that is causing a problem with some links so I changed it to just be a capital J. The last character is ignored when uncrushed so it doesn't matter what character you use here.

Let me know if this fixes your issue.

https://github.com/KilledByAPixel/JSONCrush/blob/master/JSONCrush.js#L151