QR码限制 [英] QR codes Limits

查看:126
本文介绍了QR码限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须生成带有自定义字段的代码:该字段的field+namefield+nameid.

I have to generate codes with custom fields: id of field+name of field+values of the field.

  1. 我可以在QRcode中编码的数据多长时间?我需要知道可以插入多少个字段\值.

  1. How long is the data I can encode inside the QRcode? I need to know how many fields\values I can insert.

我应该使用XML还是JSON或CSV?什么是最通用且最有效的?

Should I use XML or JSON or CSV? What is most generic and efficient?

推荐答案

XML/JSON不包含QR码的字母数字模式,因为它包含小写字母.您必须使用字节模式.最多为2,953个字符.但是,实际的限制要少得多-可能是几百个字符.

XML / JSON will not qualify for a QR code's alphanumeric mode since it will include lower-case letters. You'll have to use byte mode. The max is 2,953 characters. But, the practical limit is far less -- perhaps a few hundred characters.

如果可以的话,最好将超链接编码为数据.

It is far better to encode a hyperlink to data if you can.

正如Terence所说,除了显示XML/JSON,其他任何读者都不会对其进行任何处理.无论如何,您都需要一个自定义阅读器才能对该数据进行有用的处理. (这表明这不是QR码的好用例.)但是,如果您要创建自己的阅读器,则可以使用gzip压缩来使有效负载小得多.您的读者会知道将其解压缩.

As Terence says, no reader will do anything with XML/JSON except show it. You need a custom reader anyway to do something useful with that data. (Which suggests this is not a good use case for QR codes.) But if you're making your own reader, you can use gzip compression to make the payload much smaller. Your reader would know to unzip it.

您可能会放弃一些可行的方法,但这通常不是一个好方法.

You might get away with something workable but this is not a good approach in general.

这篇关于QR码限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆