Script Library: 1238 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Discussion posts for script json.r

1
ahmedsayeed1
12-Oct-2021 15:19
json-ctx: context [
emit-type: object!
  make-objects?: does [object! = emit-type]
cache: copy []
https://www.webb-dev.co.uk/
push: func [val] [cache: insert/only cache val]
  pop: has [tmp] [tmp: first cache: back cache remove cache tmp]
out: res: s: none
emit: func [value][res: insert/only res value]

http://www-look-4.com/

  make-translate-func: func [
table [series!] "Escape table, as pairs of from/to string! or char! values."
/local make-rule rules
][
; There are some NEW-LINE calls in this function, which may seem
; superfluous.

https://komiya-dental.com/

It's true that it may be a rare case where you want to
; inspect the generated function if used dynamically, but this may also
      ; be used to generate static functions to be included. That is, you may
; use it as a code generator. In that case, the extra formatting helps.

make-rule: func [
"Returns a parse rule to translate one value to another in the input."
orig
http://www.iu-bloomington.com/
new
      ] [
orig: form orig
new: form new
new-line/all compose [
(orig)
https://waytowhatsnext.com/
(to-paren compose [pos: change/part pos (new) (length? orig)])
              :pos
] off
]
      ; Create a block of parse rules from the table of value translations.
rules: copy []
foreach [from to] table [
repend rules [make-rule from to '|]
]
append rules 'skip ; The final rule

http://www.wearelondonmade.com/

      ; Make the formatting of the generated code a little nicer, putting
; each parse rule on a separate line.
new-line rules on
new-line/skip next rules on 2

; Return a function that uses the parse rules we just generated from
; the map.
http://www.jopspeech.com/
func [
          "Return a copy of the input string, after translating values."
string [any-string!]
/local pos
] compose/deep [
parse/all string [any [pos: (rules)]]
string

http://joerg.li/

json-ctx: context [
emit-type: object!
  make-objects?: does [object! = emit-type]
cache: copy []
push: func [val] [cache: insert/only cache val]
pop: has [tmp] [tmp: first cache: back cache remove cache tmp]
out: res: s: none
emit: func [value][res: insert/only res value]

http://connstr.net/

  make-translate-func: func [
table [series!] "Escape table, as pairs of from/to string! or char! values."
/local make-rule rules
][
; There are some NEW-LINE calls in this function, which may seem
; superfluous.
http://embermanchester.uk/
It's true that it may be a rare case where you want to
      ; inspect the generated function if used dynamically, but this may also
; be used to generate static functions to be included. That is, you may
; use it as a code generator. In that case, the extra formatting helps.

make-rule: func [
http://www.slipstone.co.uk/
“Returns a parse rule to translate one value to another in the input.”
          orig
new
] [
orig: form orig
new: form new
new-line/all compose [
(orig)
(to-paren compose [pos: change/part pos (new) (length? orig)])
:pos
http://logoarts.co.uk/
] off
      ]
      ; Create a block of parse rules from the table of value translations.
rules: copy []
foreach [from to] table [
repend rules [make-rule from to '|]
]
append rules 'skip ; The final rule
http://acpirateradio.co.uk/
; Make the formatting of the generated code a little nicer, putting
      ; each parse rule on a separate line.
new-line rules on
new-line/skip next rules on 2

; Return a function that uses the parse rules we just generated from
; the map.
func [
"Return a copy of the input string, after translating values."
string [any-string!]
http://www.compilatori.com/
/local pos
      ] compose/deep [
parse/all string [any [pos: (rules)]]
string
2
ahmedsayeed1
12-Oct-2021 15:56
3
mark214
20-Nov-2021 20:11
REBOL

Great Post. Thanks for the information. electrician in redding

Contents:

MakeDoc2 by REBOL- 20-Nov-2021
4
richardsjenk
23-Nov-2021 3:41
REBOL

Great! This script creates TAR archives, but how to untar?

Contents:

tree doctor orange county

MakeDoc2 by REBOL- 23-Nov-2021
5
marosol
10-Dec-2021 1:35
REBOL

Great stuff. Wondering how it works.

Contents:

Gutter Repair Lehigh Valley

MakeDoc2 by REBOL- 10-Dec-2021
6
miyukiss
1-Mar 9:48
REBOL

I might want to say that this blog truly persuaded me to do it! Much appreciated, generally excellent post.

Contents:

foundation repair

MakeDoc2 by REBOL- 1-Mar-2022
7
saruonhosari
1-Mar 20:08
REBOL

“Returns a parse rule to translate one value to another in the input.”

Contents:

www.towingofgreenville.com

MakeDoc2 by REBOL- 1-Mar-2022
8
grantc
2-Mar 20:41
REBOL

Great post and worth to share!

Contents:

Grant | Kitchen Design

MakeDoc2 by REBOL- 2-Mar-2022
9
marie
10-Mar 22:17
REBOL

You're well aware that your projects stand out from the crowd. They have a unique quality to them. They all look to me to be quite brilliant!

Contents:

basement repair in Chesterbrook, PA

MakeDoc2 by REBOL- 10-Mar-2022
10
kyzer
11-Mar 11:07
REBOL

Thanks for this awesome post. images printing little rock

Contents:

MakeDoc2 by REBOL- 11-Mar-2022
11
breana
15-Mar 10:04
REBOL

Great site to visit, nice content you shared here. underground utility contractors santa cruz

Contents:

MakeDoc2 by REBOL- 15-Mar-2022
12
marie
16-Mar 8:35
REBOL

Great post! You have pointed out some wonderful points.

Contents:

Drywall contractor in Raleigh NC

MakeDoc2 by REBOL- 16-Mar-2022
13
odonnellmon
19-Mar 8:13
REBOL

Returns a parse rule to translate one value to another in the input.

Contents:

https://www.treeserviceofaustin.com

MakeDoc2 by REBOL- 19-Mar-2022
14
louisse
7-Apr 22:29

The term ‘flat roof’ fills many misinformed homeowners across the country with dread and apprehension, with stories of their apparent problematic and unreliable nature challenging to ignore. [url=https://www.roofingspecialistscheltenham.co.uk/flat-roof]GRP fibre glass[/url]

15
annasmith
13-Apr 7:25
REBOL

Glad to see this site again, nice article as always. commercial electrician los gatos

Contents:

MakeDoc2 by REBOL- 13-Apr-2022
16
idasanka
28-Apr 7:23

I appreciate your blog post and the content you shared with us is simply wonderful https://deckbuildersgreenvillesc.com

17
idasanka
28-Apr 7:25

thank you for this! really appreciate you doing this https://carwrapslubbock.com

18
danielperez1
12-May 8:31
REBOL

I really like your post! Thanks used chanel purse

Contents:

MakeDoc2 by REBOL- 12-May-2022
19
brix
12-May 9:40
REBOL

It's nice seeing this great site again, nice content as always shared here. irrigation system arlington texas

Contents:

MakeDoc2 by REBOL- 12-May-2022
20
hotarticles2
13-May 1:41
REBOL

became a searcher,wanting to discover who i was and what made me precise. my view of myself turned into changing. i desired a stable base to start from. i commenced to resist3 stress to behave in ways that i didn’t like any greater,and i used to be delighted by who i in reality become. i got here to feel a good deal extra sure that no one can ever take my region. seo company

Contents:

MakeDoc2 by REBOL- 13-May-2022
21
alfsavage10
15-May 18:59
My developer is trying to convince me to move to .net from PHP. I have always disliked the idea because of the expenses. But he’s trying nonetheless. I’ve been using Movable-type on several websites for about a year and am anxious about switching to another platform. I have heard great things about blogengine.net. Is there a way I can transfer all my WordPress posts into it? Any help would be appreciated. - Tree removal Columbia 
22
crutcherhuyn
19-May 9:30
REBOL

“Returns a parse rule to translate one value to another in the input.”

Contents:

www.reikiofaustin.com/book-now

MakeDoc2 by REBOL- 19-May-2022
Notes