encoding/json: fix Doc comments for Extract and Decode

Currently comments refer to previous function signatures and the now
extinct src parameter.

Fix that. Also renamed the []byte variable to be more aligned with Go
standard library encoding/json convention which makes the comment read
more easily.

Change-Id: I901d658be26d9c98b0fe7f51b25612228cae91ef
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/5200
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/json/json.go b/encoding/json/json.go
index 25600e9..50b9726 100644
--- a/encoding/json/json.go
+++ b/encoding/json/json.go
@@ -43,14 +43,10 @@
 	return err
 }
 
-// Extract parses the JSON to a CUE expression.
-//
-// If src != nil, Extract parses the source from src and the path is for
-// position information. The type of the argument for the src parameter must be
-// string, []byte, or io.Reader. If src == nil, ParseFile parses the file
-// specified by filename.
-func Extract(path string, b []byte) (ast.Expr, error) {
-	expr, err := extract(path, b)
+// Extract parses JSON-encoded data to a CUE expression, using path for
+// position information.
+func Extract(path string, data []byte) (ast.Expr, error) {
+	expr, err := extract(path, data)
 	if err != nil {
 		return nil, err
 	}
@@ -58,14 +54,10 @@
 	return expr, nil
 }
 
-// Decode converts a JSON file to a CUE value.
-//
-// If src != nil, Extract parses the source from src and the path is for
-// position information. The type of the argument for the src parameter must be
-// string, []byte, or io.Reader. If src == nil, ParseFile parses the file
-// specified by filename.
-func Decode(r *cue.Runtime, path string, b []byte) (*cue.Instance, error) {
-	expr, err := extract(path, b)
+// Decode parses JSON-encoded data to a CUE value, using path for position
+// information.
+func Decode(r *cue.Runtime, path string, data []byte) (*cue.Instance, error) {
+	expr, err := extract(path, data)
 	if err != nil {
 		return nil, err
 	}