]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove '&' from json
authorAlan T. DeKok <aland@freeradius.org>
Sat, 8 Mar 2025 14:25:32 +0000 (09:25 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 8 Mar 2025 14:25:32 +0000 (09:25 -0500)
doc/antora/modules/reference/pages/raddb/mods-available/json.adoc
raddb/mods-available/json

index 8cc1ab452c4139f8bb1bdc7a2176148374c1c89a..74fc64c5394da726bda04bad23a188e20180431b 100644 (file)
@@ -65,8 +65,8 @@ fields can be accessed using 'map' as shown in the example below.
 [source, unlang]
 ----
 map json "%rest(GET http://example.org/api/user/%{User-Name})" {
-  &Foo            := '$.account number'
-  &Group          += '$.groups.*'
+  Foo            := '$.account number'
+  Group          += '$.groups.*'
 }
 ----
 
@@ -159,7 +159,7 @@ NOTE: Validate parser for everything except unions and expressions.
 ----
 string payload
 payload := '$.my.json.payload[1]'
-&reply.Reply-Message := "Validation of %{payload} is %json.jpath_validate($.my.json.payload[1])"
+reply.Reply-Message := "Validation of %{payload} is %json.jpath_validate($.my.json.payload[1])"
 ----
 
 .Output
@@ -179,8 +179,8 @@ Escapes string for use as a JSON string.
 [source,unlang]
 ----
 string path
-&path := "caipirinha/gelada"
-&reply.Reply-Message := "The string %{path} should be %json.quote(%{path}) to be a valid JSON string."
+path := "caipirinha/gelada"
+reply.Reply-Message := "The string %{path} should be %json.quote(%{path}) to be a valid JSON string."
 ----
 
 .Output
@@ -212,7 +212,7 @@ it, `link:https://freeradius.org/rfc/rfc2865.html#User-Name[User-Name]` and `lin
 .Example
 
 ```
-%json.encode(&User-Name, &Calling-Station-Id)
+%json.encode('User-Name', 'Calling-Station-Id')
 ```
 
 The following will include all attributes in the RADIUS request, except for
@@ -221,17 +221,17 @@ The following will include all attributes in the RADIUS request, except for
 .Example
 
 ```
-%json.encode(&request[*], !&User-Password)
+%json.encode('request[*]', '!User-Password')
 ```
 
 In another (contrived) example, all the attributes in the RADIUS request will
 be included in the document, _except_ any attributes in the RADIUS reply.
-`&User-Name` will be included from the control list, too, if it exists:
+`link:https://freeradius.org/rfc/rfc2865.html#User-Name[User-Name]` will be included from the control list, too, if it exists:
 
 .Example
 
 ```
-%json.encode(&request[*], !&reply[*], &control.User-Name)
+%json.encode('request[*]', '!reply[*]', 'control.User-Name')
 ```
 
 #### Output format modes
index fff4173496da62e82176ba9b04228f7888a1d1fd..7f7e9d508e6c3008aeb9c27365a9c9c3ff1eb7c0 100644 (file)
@@ -229,7 +229,7 @@ json {
 #  .Example
 #
 #  ```
-#  %json.encode(&User-Name, &Calling-Station-Id)
+#  %json.encode('User-Name', 'Calling-Station-Id')
 #  ```
 #
 #  The following will include all attributes in the RADIUS request, except for
@@ -238,17 +238,17 @@ json {
 #  .Example
 #
 #  ```
-#  %json.encode(&request[*], !&User-Password)
+#  %json.encode('request[*]', '!User-Password')
 #  ```
 #
 #  In another (contrived) example, all the attributes in the RADIUS request will
 #  be included in the document, _except_ any attributes in the RADIUS reply.
-#  `&User-Name` will be included from the control list, too, if it exists:
+#  `User-Name` will be included from the control list, too, if it exists:
 #
 #  .Example
 #
 #  ```
-#  %json.encode(&request[*], !&reply[*], &control.User-Name)
+#  %json.encode('request[*]', '!reply[*]', 'control.User-Name')
 #  ```
 #
 #  #### Output format modes