encoding/jsonschema: fix Windows path issue

Change-Id: I4cb283855e9348bb9fe2d86f6fbbb537d3a938aa
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/4666
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/jsonschema/decode.go b/encoding/jsonschema/decode.go
index dff0cc7..84d7ed8 100644
--- a/encoding/jsonschema/decode.go
+++ b/encoding/jsonschema/decode.go
@@ -21,6 +21,7 @@
 import (
 	"fmt"
 	"path"
+	"path/filepath"
 	"sort"
 	"strings"
 
@@ -68,7 +69,7 @@
 
 	var a []ast.Decl
 
-	name := filename
+	name := filepath.ToSlash(filename)
 	if state.id != "" {
 		name = strings.Trim(name, "#")
 	}